MatchConstraint.
More...
#include <MatchConstraintList.hpp>
|
| | MatchConstraint (unsigned int id, Relation relation) |
| | Constructs a MatchConstraint object with the given identifier and relational constraint on the values of matching query/target attribute pairs. More...
|
| |
| template<typename T > |
| | MatchConstraint (unsigned int id, Relation rel, T &&val) |
| | Constructs a MatchConstraint object with the given identifier, relational constraint on the values of matching query/target attribute pairs and value of the query attribute. More...
|
| |
| unsigned int | getID () const |
| | Returns the identifier of the match constraint. More...
|
| |
| void | setID (unsigned int id) |
| | Sets the match constraint identifier to id. More...
|
| |
| Relation | getRelation () const |
| | Returns the relational constraint that must be fulfilled by the values of matching query/target attribute pairs. More...
|
| |
| void | setRelation (Relation rel) |
| | Sets the relational constraint that must be fulfilled by the values of matching query/target attribute pairs. More...
|
| |
| const Base::Any & | getValue () const |
| | Returns the value of the query attribute. More...
|
| |
| template<typename T > |
| const T & | getValue () const |
| | Returns a const reference to the value of the query attribute of type T. More...
|
| |
| template<typename T > |
| void | setValue (T &&val) |
| | Sets the value of the query attribute. More...
|
| |
| bool | hasValue () const |
| | Tells wether a query attribute value has been set. More...
|
| |
◆ Relation
Defines constants for the specification of relational constraints on the values of query/target attribute pairs.
| Enumerator |
|---|
| ANY | Specifies that the relation between the query and target attribute value is not constrained.
|
| LESS | Specifies that the value of the query attribute must be less than the corresponding value of the target attribute to fulfill the constraint.
|
| EQUAL | Specifies that the value of the query attribute must be equal to the corresponding value of the target attribute to fulfill the constraint.
|
| GREATER | Specifies that the value of the query attribute must be greater than the corresponding value of the target attribute to fulfill the constraint.
|
| LESS_OR_EQUAL | Specifies that the value of the query attribute must be less than or equal to the corresponding value of the target attribute to fulfill the constraint.
|
| GREATER_OR_EQUAL | Specifies that the value of the query attribute must be greater than or equal to the corresponding value of the target attribute to fulfill the constraint.
|
| NOT_EQUAL | Specifies that the value of the query attribute must not be equal to the corresponding value of the target attribute to fulfill the constraint.
|
◆ MatchConstraint() [1/2]
| CDPL::Chem::MatchConstraint::MatchConstraint |
( |
unsigned int |
id, |
|
|
Relation |
relation |
|
) |
| |
|
inline |
Constructs a MatchConstraint object with the given identifier and relational constraint on the values of matching query/target attribute pairs.
- Parameters
-
| id | The identifier of the match constraint. |
| relation | The relational constraint on the values of matching query/target attribute pairs. |
◆ MatchConstraint() [2/2]
template<typename T >
| CDPL::Chem::MatchConstraint::MatchConstraint |
( |
unsigned int |
id, |
|
|
Relation |
rel, |
|
|
T && |
val |
|
) |
| |
|
inline |
Constructs a MatchConstraint object with the given identifier, relational constraint on the values of matching query/target attribute pairs and value of the query attribute.
- Parameters
-
| id | The identifier of the match constraint. |
| rel | The relational constraint on the values of matching query/target attribute pairs. |
| val | The value of the query attribute. |
◆ getID()
| unsigned int CDPL::Chem::MatchConstraint::getID |
( |
| ) |
const |
Returns the identifier of the match constraint.
- Returns
- The identifier of the match constraint.
◆ setID()
| void CDPL::Chem::MatchConstraint::setID |
( |
unsigned int |
id | ) |
|
Sets the match constraint identifier to id.
- Parameters
-
| id | The identifier of the match constraint. |
◆ getRelation()
| Relation CDPL::Chem::MatchConstraint::getRelation |
( |
| ) |
const |
Returns the relational constraint that must be fulfilled by the values of matching query/target attribute pairs.
- Returns
- The relational constraint on the values of matching query/target attribute pairs.
◆ setRelation()
| void CDPL::Chem::MatchConstraint::setRelation |
( |
Relation |
rel | ) |
|
Sets the relational constraint that must be fulfilled by the values of matching query/target attribute pairs.
- Parameters
-
| rel | The relational constraint on the values of matching query/target attribute pairs. |
◆ getValue() [1/2]
| const Base::Any& CDPL::Chem::MatchConstraint::getValue |
( |
| ) |
const |
Returns the value of the query attribute.
- Returns
- The value of the query attribute.
◆ getValue() [2/2]
template<typename T >
| const T& CDPL::Chem::MatchConstraint::getValue |
( |
| ) |
const |
|
inline |
Returns a const reference to the value of the query attribute of type T.
- Returns
- A
const reference to the value of the stored query attribute.
- Exceptions
-
| Base::BadCast | if the stored Any instance is empty, or the stored value is not of the specified type T. |
◆ setValue()
template<typename T >
| void CDPL::Chem::MatchConstraint::setValue |
( |
T && |
val | ) |
|
|
inline |
Sets the value of the query attribute.
- Parameters
-
| val | The value of the query attribute. |
◆ hasValue()
| bool CDPL::Chem::MatchConstraint::hasValue |
( |
| ) |
const |
Tells wether a query attribute value has been set.
- Returns
true if the value of the query attribute has been set, false otherwise.
The documentation for this class was generated from the following file: