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

A data type for the storage and lookup of arbitrary entity to entity mappings. More...

+ Inheritance diagram for CDPL.Chem.Entity3DMapping:

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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Chem.Entity3DMapping.__init__ ( Entity3DMapping  mapping)

Initializes a copy of the Entity3DMapping instance mapping.

Parameters
mappingThe Entity3DMapping instance to copy.

Member Function Documentation

◆ getObjectID()

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

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

◆ getSize()

int CDPL.Chem.Entity3DMapping.getSize ( )
Returns

◆ isEmpty()

bool CDPL.Chem.Entity3DMapping.isEmpty ( )
Returns

◆ assign()

Entity3DMapping CDPL.Chem.Entity3DMapping.assign ( Entity3DMapping  map)

Replaces the current state of self with a copy of the state of the Entity3DMapping instance map.

Parameters
mapThe Entity3DMapping instance to copy.
Returns
self

◆ getValue() [1/2]

Entity3D CDPL.Chem.Entity3DMapping.getValue ( Entity3D  key)
Parameters
key
Returns

◆ getValue() [2/2]

Entity3D CDPL.Chem.Entity3DMapping.getValue ( Entity3D  key,
Entity3D  def_value 
)
Parameters
key
def_value
Returns

◆ removeEntry()

bool CDPL.Chem.Entity3DMapping.removeEntry ( Entity3D  key)
Parameters
key
Returns

◆ setEntry()

None CDPL.Chem.Entity3DMapping.setEntry ( Entity3D  key,
Entity3D  value 
)
Parameters
key
value

◆ getKeys()

object CDPL.Chem.Entity3DMapping.getKeys ( )
Returns

◆ keys()

object CDPL.Chem.Entity3DMapping.keys ( )
Returns

◆ getValues() [1/2]

object CDPL.Chem.Entity3DMapping.getValues ( )
Returns

◆ getValues() [2/2]

object CDPL.Chem.Entity3DMapping.getValues ( Entity3D  key)
Parameters
key
Returns

◆ values()

object CDPL.Chem.Entity3DMapping.values ( )
Returns

◆ getEntries()

object CDPL.Chem.Entity3DMapping.getEntries ( )
Returns

◆ items()

object CDPL.Chem.Entity3DMapping.items ( )
Returns

◆ getNumEntries()

int CDPL.Chem.Entity3DMapping.getNumEntries ( Entity3D  key)
Parameters
key
Returns

◆ removeEntries()

int CDPL.Chem.Entity3DMapping.removeEntries ( Entity3D  key)
Parameters
key
Returns

◆ insertEntry()

None CDPL.Chem.Entity3DMapping.insertEntry ( Entity3D  key,
Entity3D  value 
)
Parameters
key
value

◆ __len__()

int CDPL.Chem.Entity3DMapping.__len__ ( )
Returns

◆ __getitem__()

Entity3D CDPL.Chem.Entity3DMapping.__getitem__ ( Entity3D  key)
Parameters
key
Returns

◆ __setitem__()

None CDPL.Chem.Entity3DMapping.__setitem__ ( Entity3D  key,
Entity3D  value 
)
Parameters
key
value

◆ __delitem__()

bool CDPL.Chem.Entity3DMapping.__delitem__ ( Entity3D  key)
Parameters
key
Returns

◆ __contains__()

int CDPL.Chem.Entity3DMapping.__contains__ ( Entity3D  key)

Returns the result of the membership test operation key in self.

Parameters
keyThe value to test for membership.
Returns
The result of the membership test operation.