![]() |
Chemical Data Processing Library Python API - Version 1.4.0
|
A single data item (column) of an mmCIF category, holding an ordered list of string values. More...
Inheritance diagram for CDPL.Biomol.MMCIFData.Item:Public Member Functions | |
| None | __init__ (str name) |
Constructs an empty Item with the data-item name name. More... | |
| None | __init__ (Item item) |
Initializes a copy of the Item instance item. More... | |
| int | getObjectID () |
| Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
| Item | assign (Item item) |
Replaces the current state of self with a copy of the state of the Item instance item. More... | |
| None | swap (Item cat) |
| None | clear () |
| Removes all values from the item. | |
| str | getName () |
| int | getNumValues () |
| Returns the number of values stored in the item. More... | |
| str | getValue (int index) |
| Returns the value at the zero-based index index. More... | |
| None | setValue (int index, str value) |
| Replaces the value at the zero-based index index by moving value. More... | |
| None | addValue (str value) |
| Appends the value value to the item's value list by moving. More... | |
| None | removeValue (int index) |
| Removes the value at the zero-based index index. More... | |
| int | __len__ () |
| str | __getitem__ (int index) |
| None | __delitem__ (int index) |
| None | __setitem__ (int index, str value) |
Properties | |
| objectID = property(getObjectID) | |
| numValues = property(getNumValues) | |
| name = property(getName) | |
A single data item (column) of an mmCIF category, holding an ordered list of string values.
| None CDPL.Biomol.MMCIFData.Item.__init__ | ( | str | name | ) |
Constructs an empty Item with the data-item name name.
| name | The fully-qualified mmCIF data-item name (including the _ prefix). |
| None CDPL.Biomol.MMCIFData.Item.__init__ | ( | Item | item | ) |
Initializes a copy of the Item instance item.
| item | The Item instance to copy. |
| int CDPL.Biomol.MMCIFData.Item.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python Item 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 Item 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().
Replaces the current state of self with a copy of the state of the Item instance item.
| item | The Item instance to copy. |
| None CDPL.Biomol.MMCIFData.Item.swap | ( | Item | cat | ) |
| cat |
| str CDPL.Biomol.MMCIFData.Item.getName | ( | ) |
| arg1 |
| int CDPL.Biomol.MMCIFData.Item.getNumValues | ( | ) |
Returns the number of values stored in the item.
| str CDPL.Biomol.MMCIFData.Item.getValue | ( | int | index | ) |
Returns the value at the zero-based index index.
| index | The zero-based value index. |
| Base.IndexError | if the number of values is zero or index is not in the range [0, getNumValues() - 1]. |
| None CDPL.Biomol.MMCIFData.Item.setValue | ( | int | index, |
| str | value | ||
| ) |
Replaces the value at the zero-based index index by moving value.
| index | The zero-based value index. |
| value | The new value to move-assign. |
| Base.IndexError | if the number of values is zero or index is not in the range [0, getNumValues() - 1]. |
| None CDPL.Biomol.MMCIFData.Item.addValue | ( | str | value | ) |
Appends the value value to the item's value list by moving.
| value | The value to move-append. |
| None CDPL.Biomol.MMCIFData.Item.removeValue | ( | int | index | ) |
Removes the value at the zero-based index index.
| index | The zero-based value index. |
| Base.IndexError | if the number of values is zero or index is not in the range [0, getNumValues() - 1]. |
| int CDPL.Biomol.MMCIFData.Item.__len__ | ( | ) |
| str CDPL.Biomol.MMCIFData.Item.__getitem__ | ( | int | index | ) |
| index |
| None CDPL.Biomol.MMCIFData.Item.__delitem__ | ( | int | index | ) |
| index |
| None CDPL.Biomol.MMCIFData.Item.__setitem__ | ( | int | index, |
| str | value | ||
| ) |
| index | |
| value |