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

MatchConstraintList. More...

+ Inheritance diagram for CDPL.Chem.MatchConstraintList:

Classes

class  Type
 Defines constants that describe the logical type of the match constraint list. More...
 

Public Member Functions

None __init__ (MatchConstraintList list)
 Initializes a copy of the MatchConstraintList instance list. More...
 
None __init__ (Type type=CDPL.Chem.Type.AND_LIST)
 Constructs a MatchConstraintList object with the specified logical type. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
int getSize ()
 
bool isEmpty ()
 
None resize (int num_elem, MatchConstraint value)
 
None reserve (int num_elem)
 
int getCapacity ()
 
None clear ()
 
MatchConstraintList assign (MatchConstraintList array)
 Replaces the current state of self with a copy of the state of the MatchConstraintList instance array. More...
 
None assign (int num_elem, MatchConstraint value)
 
None addElement (MatchConstraint value)
 
None addElement (int id, Relation rel)
 Appends a new Chem.MatchConstraint element with the given identifier and relational constraint on the values of matching query/target attribute pairs. More...
 
None addElement (int id, Relation rel, Base.Any val)
 Appends a new Chem.MatchConstraint element with the given identifier, relational constraint on the values of matching query/target attribute pairs and value of the query attribute. More...
 
None addElements (MatchConstraintList values)
 
None insertElement (int idx, MatchConstraint value)
 
None insertElements (int idx, int num_elem, MatchConstraint value)
 
None insertElements (int index, MatchConstraintList values)
 
None popLastElement ()
 
None removeElement (int idx)
 
None removeElements (int begin_idx, int end_idx)
 
MatchConstraint getFirstElement ()
 
MatchConstraint getLastElement ()
 
MatchConstraint getElement (int idx)
 
None setElement (int idx, MatchConstraint value)
 
Type getType ()
 Returns the logical type of the match constraint list. More...
 
None setType (Type type)
 Sets the logical type of the match constraint list. More...
 
None __delitem__ (int idx)
 
MatchConstraint __getitem__ (int idx)
 
int __len__ ()
 
None __setitem__ (int index, MatchConstraint value)
 
str __str__ ()
 Returns a string representation of the MatchConstraintList instance. More...
 

Properties

 objectID = property(getObjectID)
 
 size = property(getSize)
 
 type = property(getType, setType)
 

Detailed Description

MatchConstraintList.

Constructor & Destructor Documentation

◆ __init__() [1/2]

None CDPL.Chem.MatchConstraintList.__init__ ( MatchConstraintList  list)

Initializes a copy of the MatchConstraintList instance list.

Parameters
listThe MatchConstraintList instance to copy.

◆ __init__() [2/2]

None CDPL.Chem.MatchConstraintList.__init__ ( Type   type = CDPL.Chem.Type.AND_LIST)

Constructs a MatchConstraintList object with the specified logical type.

Parameters
typeThe logical type of the match constraint list.

Member Function Documentation

◆ getObjectID()

int CDPL.Chem.MatchConstraintList.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python MatchConstraintList instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two MatchConstraintList instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().

Returns
The numeric ID of the internally referenced C++ class instance.

◆ getSize()

int CDPL.Chem.MatchConstraintList.getSize ( )
Returns

◆ isEmpty()

bool CDPL.Chem.MatchConstraintList.isEmpty ( )
Returns

◆ resize()

None CDPL.Chem.MatchConstraintList.resize ( int  num_elem,
MatchConstraint  value 
)
Parameters
num_elem
value

◆ reserve()

None CDPL.Chem.MatchConstraintList.reserve ( int  num_elem)
Parameters
num_elem

◆ getCapacity()

int CDPL.Chem.MatchConstraintList.getCapacity ( )
Returns

◆ assign() [1/2]

MatchConstraintList CDPL.Chem.MatchConstraintList.assign ( MatchConstraintList  array)

Replaces the current state of self with a copy of the state of the MatchConstraintList instance array.

Parameters
arrayThe MatchConstraintList instance to copy.
Returns
self

◆ assign() [2/2]

None CDPL.Chem.MatchConstraintList.assign ( int  num_elem,
MatchConstraint  value 
)
Parameters
num_elem
value

◆ addElement() [1/3]

None CDPL.Chem.MatchConstraintList.addElement ( MatchConstraint  value)
Parameters
value

◆ addElement() [2/3]

None CDPL.Chem.MatchConstraintList.addElement ( int  id,
Relation  rel 
)

Appends a new Chem.MatchConstraint element with the given identifier and relational constraint on the values of matching query/target attribute pairs.

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

◆ addElement() [3/3]

None CDPL.Chem.MatchConstraintList.addElement ( int  id,
Relation  rel,
Base.Any  val 
)

Appends a new Chem.MatchConstraint element 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.

◆ addElements()

None CDPL.Chem.MatchConstraintList.addElements ( MatchConstraintList  values)
Parameters
values

◆ insertElement()

None CDPL.Chem.MatchConstraintList.insertElement ( int  idx,
MatchConstraint  value 
)
Parameters
idx
value

◆ insertElements() [1/2]

None CDPL.Chem.MatchConstraintList.insertElements ( int  idx,
int  num_elem,
MatchConstraint  value 
)
Parameters
idx
num_elem
value

◆ insertElements() [2/2]

None CDPL.Chem.MatchConstraintList.insertElements ( int  index,
MatchConstraintList  values 
)
Parameters
index
values

◆ removeElement()

None CDPL.Chem.MatchConstraintList.removeElement ( int  idx)
Parameters
idx

◆ removeElements()

None CDPL.Chem.MatchConstraintList.removeElements ( int  begin_idx,
int  end_idx 
)
Parameters
begin_idx
end_idx

◆ getFirstElement()

MatchConstraint CDPL.Chem.MatchConstraintList.getFirstElement ( )
Returns

◆ getLastElement()

MatchConstraint CDPL.Chem.MatchConstraintList.getLastElement ( )
Returns

◆ getElement()

MatchConstraint CDPL.Chem.MatchConstraintList.getElement ( int  idx)
Parameters
idx
Returns

◆ setElement()

None CDPL.Chem.MatchConstraintList.setElement ( int  idx,
MatchConstraint  value 
)
Parameters
idx
value

◆ getType()

Type CDPL.Chem.MatchConstraintList.getType ( )

Returns the logical type of the match constraint list.

Returns
The logical type of the match constraint list.

◆ setType()

None CDPL.Chem.MatchConstraintList.setType ( Type  type)

Sets the logical type of the match constraint list.

Parameters
typeThe logical type of the match constraint list.

◆ __delitem__()

None CDPL.Chem.MatchConstraintList.__delitem__ ( int  idx)
Parameters
idx

◆ __getitem__()

MatchConstraint CDPL.Chem.MatchConstraintList.__getitem__ ( int  idx)
Parameters
idx
Returns

◆ __len__()

int CDPL.Chem.MatchConstraintList.__len__ ( )
Returns

◆ __setitem__()

None CDPL.Chem.MatchConstraintList.__setitem__ ( int  index,
MatchConstraint  value 
)
Parameters
index
value

◆ __str__()

str CDPL.Chem.MatchConstraintList.__str__ ( )

Returns a string representation of the MatchConstraintList instance.

Returns
The generated string representation.