Chemical Data Processing Library Python API - Version 1.2.0
|
A data type for the storage and lookup of arbitrary entity to entity mappings. More...
Public Member Functions | |
None | __init__ () |
Initializes the Entity3DMapping instance. | |
None | __init__ (Entity3DMapping mapping) |
Initializes a copy of the Entity3DMapping instance mapping. More... | |
int | getObjectID () |
Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
int | getSize () |
bool | isEmpty () |
None | clear () |
Entity3DMapping | assign (Entity3DMapping map) |
Replaces the current state of self with a copy of the state of the Entity3DMapping instance map. More... | |
Entity3D | getValue (Entity3D key) |
Entity3D | getValue (Entity3D key, Entity3D def_value) |
bool | removeEntry (Entity3D key) |
None | setEntry (Entity3D key, Entity3D value) |
object | getKeys () |
object | keys () |
object | getValues () |
object | getValues (Entity3D key) |
object | values () |
object | getEntries () |
object | items () |
int | getNumEntries (Entity3D key) |
int | removeEntries (Entity3D key) |
None | insertEntry (Entity3D key, Entity3D value) |
int | __len__ () |
Entity3D | __getitem__ (Entity3D key) |
None | __setitem__ (Entity3D key, Entity3D value) |
bool | __delitem__ (Entity3D key) |
int | __contains__ (Entity3D key) |
Returns the result of the membership test operation key in self . More... | |
Properties | |
objectID = property(getObjectID) | |
size = property(getSize) | |
A data type for the storage and lookup of arbitrary entity to entity mappings.
Entity3Ds mappings are stored as pairs of references to the mapped Chem.Entity3D objects. Mappings do not have to be unique and multiple mappings of a given entity to other entities are possible. If a mapping entry for a particular entity does not exist, the methods Entity3DMapping.getValue() and Entity3DMapping.operator[]() return a None reference to indicate that the lookup of the mapped entity has failed.
None CDPL.Chem.Entity3DMapping.__init__ | ( | Entity3DMapping | mapping | ) |
Initializes a copy of the Entity3DMapping instance mapping.
mapping | The Entity3DMapping instance to copy. |
int CDPL.Chem.Entity3DMapping.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python Entity3DMapping 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 Entity3DMapping 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()
.
int CDPL.Chem.Entity3DMapping.getSize | ( | ) |
bool CDPL.Chem.Entity3DMapping.isEmpty | ( | ) |
Entity3DMapping CDPL.Chem.Entity3DMapping.assign | ( | Entity3DMapping | map | ) |
Replaces the current state of self with a copy of the state of the Entity3DMapping instance map.
map | The Entity3DMapping instance to copy. |
key | |
def_value |
bool CDPL.Chem.Entity3DMapping.removeEntry | ( | Entity3D | key | ) |
key |
object CDPL.Chem.Entity3DMapping.getKeys | ( | ) |
object CDPL.Chem.Entity3DMapping.keys | ( | ) |
object CDPL.Chem.Entity3DMapping.getValues | ( | ) |
object CDPL.Chem.Entity3DMapping.getValues | ( | Entity3D | key | ) |
key |
object CDPL.Chem.Entity3DMapping.values | ( | ) |
object CDPL.Chem.Entity3DMapping.getEntries | ( | ) |
object CDPL.Chem.Entity3DMapping.items | ( | ) |
int CDPL.Chem.Entity3DMapping.getNumEntries | ( | Entity3D | key | ) |
key |
int CDPL.Chem.Entity3DMapping.removeEntries | ( | Entity3D | key | ) |
key |
int CDPL.Chem.Entity3DMapping.__len__ | ( | ) |
bool CDPL.Chem.Entity3DMapping.__delitem__ | ( | Entity3D | key | ) |
key |
int CDPL.Chem.Entity3DMapping.__contains__ | ( | Entity3D | key | ) |
Returns the result of the membership test operation key in self
.
key | The value to test for membership. |