Chemical Data Processing Library Python API - Version 1.1.1
Classes | Public Member Functions | Properties | List of all members
CDPL.Chem.MatchConstraint Class Reference

MatchConstraint. More...

+ Inheritance diagram for CDPL.Chem.MatchConstraint:

Classes

class  Relation
 Defines constants for the specification of relational constraints on the values of query/target attribute pairs. More...
 

Public Member Functions

None __init__ (MatchConstraint constr)
 Initializes a copy of the MatchConstraint instance constr. More...
 
None __init__ (int id, Relation rel)
 Initializes the MatchConstraint instance. More...
 
None __init__ (int id, Relation rel, Base.Any 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...
 
MatchConstraint assign (MatchConstraint constr)
 Replaces the current state of self with a copy of the state of the MatchConstraint instance constr. More...
 
int getID ()
 Returns the identifier of the match constraint. More...
 
None setID (int id)
 Sets the match constraint identifier to id. More...
 
Relation getRelation ()
 Returns the relational constraint that must be fulfilled by the values of matching query/target attribute pairs. More...
 
None setRelation (Relation rel)
 Sets the relational constraint that must be fulfilled by the values of matching query/target attribute pairs. More...
 
Base.Any getValue ()
 Returns a reference to the value of the query attribute of type T. More...
 
None setValue (Base.Any val)
 Sets the value of the query attribute. More...
 
bool hasValue ()
 Tells wether a query attribute value has been set. More...
 

Properties

 id = property(getID, setID)
 
 relation = property(getRelation, setRelation)
 
 value = property(getValue, setValue)
 

Detailed Description

MatchConstraint.

Constructor & Destructor Documentation

◆ __init__() [1/3]

None CDPL.Chem.MatchConstraint.__init__ ( MatchConstraint  constr)

Initializes a copy of the MatchConstraint instance constr.

Parameters
constrThe MatchConstraint instance to copy.

◆ __init__() [2/3]

None CDPL.Chem.MatchConstraint.__init__ ( int  id,
Relation  rel 
)

Initializes the MatchConstraint instance.

Parameters
id
rel

◆ __init__() [3/3]

None CDPL.Chem.MatchConstraint.__init__ ( int  id,
Relation  rel,
Base.Any  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.

Parameters
idThe identifier of the match constraint.
relThe relational constraint on the values of matching query/target attribute pairs.
valThe value of the query attribute.

Member Function Documentation

◆ assign()

MatchConstraint CDPL.Chem.MatchConstraint.assign ( MatchConstraint  constr)

Replaces the current state of self with a copy of the state of the MatchConstraint instance constr.

Parameters
constrThe MatchConstraint instance to copy.
Returns
self

◆ getID()

int CDPL.Chem.MatchConstraint.getID ( )

Returns the identifier of the match constraint.

Returns
The identifier of the match constraint.

◆ setID()

None CDPL.Chem.MatchConstraint.setID ( int  id)

Sets the match constraint identifier to id.

Parameters
idThe identifier of the match constraint.

◆ getRelation()

Relation CDPL.Chem.MatchConstraint.getRelation ( )

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()

None CDPL.Chem.MatchConstraint.setRelation ( Relation  rel)

Sets the relational constraint that must be fulfilled by the values of matching query/target attribute pairs.

Parameters
relThe relational constraint on the values of matching query/target attribute pairs.

◆ getValue()

Base.Any CDPL.Chem.MatchConstraint.getValue ( )

Returns a reference to the value of the query attribute of type T.

Returns
A reference to the value of the stored query attribute.
Exceptions
Base.BadCastif the stored Any instance is empty, or the stored value is not of the specified type T.

◆ setValue()

None CDPL.Chem.MatchConstraint.setValue ( Base.Any  val)

Sets the value of the query attribute.

Parameters
valThe value of the query attribute.

◆ hasValue()

bool CDPL.Chem.MatchConstraint.hasValue ( )

Tells wether a query attribute value has been set.

Returns
True if the value of the query attribute has been set, False otherwise.