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

A container for the storage and lookup of Vis.Color objects that are associated with a numeric identifier. More...

+ Inheritance diagram for CDPL.Vis.ColorTable:

Public Member Functions

None __init__ ()
 Initializes the ColorTable instance.
 
None __init__ (ColorTable table)
 Initializes a copy of the ColorTable instance table. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
int getSize ()
 
bool isEmpty ()
 
None clear ()
 
ColorTable assign (ColorTable map)
 Replaces the current state of self with a copy of the state of the ColorTable instance map. More...
 
Color getValue (int key)
 
Color getValue (int key, Color def_value)
 
bool removeEntry (int key)
 
None setEntry (int key, Color value)
 
object getKeys ()
 
object keys ()
 
object getValues ()
 
object values ()
 
object getEntries ()
 
object items ()
 
bool containsEntry (int key)
 
bool insertEntry (int key, Color value)
 
int __len__ ()
 
Color __getitem__ (int key)
 
None __setitem__ (int key, Color value)
 
bool __delitem__ (int key)
 
bool __contains__ (int key)
 Returns the result of the membership test operation key in self. More...
 
str __str__ ()
 Returns a string representation of the ColorTable instance. More...
 
bool __eq__ (object table)
 Returns the result of the comparison operation self == table. More...
 
bool __ne__ (object table)
 Returns the result of the comparison operation self != table. More...
 

Properties

 objectID = property(getObjectID)
 
 size = property(getSize)
 

Detailed Description

A container for the storage and lookup of Vis.Color objects that are associated with a numeric identifier.

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Vis.ColorTable.__init__ ( ColorTable  table)

Initializes a copy of the ColorTable instance table.

Parameters
tableThe ColorTable instance to copy.

Member Function Documentation

◆ getObjectID()

int CDPL.Vis.ColorTable.getObjectID ( )

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

Different Python ColorTable 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 ColorTable 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.Vis.ColorTable.getSize ( )
Returns

◆ isEmpty()

bool CDPL.Vis.ColorTable.isEmpty ( )
Returns

◆ assign()

ColorTable CDPL.Vis.ColorTable.assign ( ColorTable  map)

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

Parameters
mapThe ColorTable instance to copy.
Returns
self

◆ getValue() [1/2]

Color CDPL.Vis.ColorTable.getValue ( int  key)
Parameters
key
Returns

◆ getValue() [2/2]

Color CDPL.Vis.ColorTable.getValue ( int  key,
Color  def_value 
)
Parameters
key
def_value
Returns

◆ removeEntry()

bool CDPL.Vis.ColorTable.removeEntry ( int  key)
Parameters
key
Returns

◆ setEntry()

None CDPL.Vis.ColorTable.setEntry ( int  key,
Color  value 
)
Parameters
key
value

◆ getKeys()

object CDPL.Vis.ColorTable.getKeys ( )
Returns

◆ keys()

object CDPL.Vis.ColorTable.keys ( )
Returns

◆ getValues()

object CDPL.Vis.ColorTable.getValues ( )
Returns

◆ values()

object CDPL.Vis.ColorTable.values ( )
Returns

◆ getEntries()

object CDPL.Vis.ColorTable.getEntries ( )
Returns

◆ items()

object CDPL.Vis.ColorTable.items ( )
Returns

◆ containsEntry()

bool CDPL.Vis.ColorTable.containsEntry ( int  key)
Parameters
key
Returns

◆ insertEntry()

bool CDPL.Vis.ColorTable.insertEntry ( int  key,
Color  value 
)
Parameters
key
value
Returns

◆ __len__()

int CDPL.Vis.ColorTable.__len__ ( )
Returns

◆ __getitem__()

Color CDPL.Vis.ColorTable.__getitem__ ( int  key)
Parameters
key
Returns

◆ __setitem__()

None CDPL.Vis.ColorTable.__setitem__ ( int  key,
Color  value 
)
Parameters
key
value

◆ __delitem__()

bool CDPL.Vis.ColorTable.__delitem__ ( int  key)
Parameters
key
Returns

◆ __contains__()

bool CDPL.Vis.ColorTable.__contains__ ( int  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.

◆ __str__()

str CDPL.Vis.ColorTable.__str__ ( )

Returns a string representation of the ColorTable instance.

Returns
The generated string representation.

◆ __eq__()

bool CDPL.Vis.ColorTable.__eq__ ( object  table)

Returns the result of the comparison operation self == table.

Parameters
tableThe object instance to be compared with.
Returns
The result of the comparison operation.

◆ __ne__()

bool CDPL.Vis.ColorTable.__ne__ ( object  table)

Returns the result of the comparison operation self != table.

Parameters
tableThe object instance to be compared with.
Returns
The result of the comparison operation.