![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
A single data item (column) of an mmCIF category, holding an ordered list of string values. More...
#include <MMCIFData.hpp>
Public Types | |
| typedef ValueList::const_iterator | ConstValueIterator |
| A constant iterator over the value list of the item. More... | |
| typedef ValueList::iterator | ValueIterator |
| A mutable iterator over the value list of the item. More... | |
Public Member Functions | |
| Item (const std::string &name) | |
Constructs an empty Item with the data-item name name. More... | |
| const std::string & | getName () const |
| Returns the fully-qualified mmCIF data-item name. More... | |
| std::size_t | getNumValues () const |
| Returns the number of values stored in the item. More... | |
| void | clear () |
| Removes all values from the item. More... | |
| const std::string & | getValue (std::size_t index) const |
| Returns the value at the zero-based index index. More... | |
| void | setValue (std::size_t index, const std::string &value) |
| Replaces the value at the zero-based index index by value. More... | |
| void | setValue (std::size_t index, std::string &&value) |
| Replaces the value at the zero-based index index by moving value. More... | |
| void | addValue (const std::string &value) |
| Appends the value value to the item's value list. More... | |
| void | addValue (std::string &&value) |
| Appends the value value to the item's value list by moving. More... | |
| ValueIterator | removeValue (const ValueIterator &it) |
| Removes the value pointed to by the iterator it. More... | |
| void | removeValue (std::size_t index) |
| Removes the value at the zero-based index index. More... | |
| void | swap (Item &item) |
| Swaps the contents of this item with those of item. More... | |
| ConstValueIterator | getValuesBegin () const |
| Returns a constant iterator pointing to the beginning of the value list. More... | |
| ValueIterator | getValuesBegin () |
| Returns a mutable iterator pointing to the beginning of the value list. More... | |
| ConstValueIterator | getValuesEnd () const |
| Returns a constant iterator pointing one past the last value. More... | |
| ValueIterator | getValuesEnd () |
| Returns a mutable iterator pointing one past the last value. More... | |
| ConstValueIterator | begin () const |
| Returns a constant iterator pointing to the beginning of the value list (alias of getValuesBegin()). More... | |
| ValueIterator | begin () |
| Returns a mutable iterator pointing to the beginning of the value list (alias of getValuesBegin()). More... | |
| ConstValueIterator | end () const |
| Returns a constant iterator pointing one past the last value (alias of getValuesEnd()). More... | |
| ValueIterator | end () |
| Returns a mutable iterator pointing one past the last value (alias of getValuesEnd()). More... | |
A single data item (column) of an mmCIF category, holding an ordered list of string values.
| typedef ValueList::const_iterator CDPL::Biomol::MMCIFData::Item::ConstValueIterator |
A constant iterator over the value list of the item.
| typedef ValueList::iterator CDPL::Biomol::MMCIFData::Item::ValueIterator |
A mutable iterator over the value list of the item.
|
inline |
Constructs an empty Item with the data-item name name.
| name | The fully-qualified mmCIF data-item name (including the _ prefix). |
| const std::string& CDPL::Biomol::MMCIFData::Item::getName | ( | ) | const |
Returns the fully-qualified mmCIF data-item name.
const reference to the data-item name. | std::size_t CDPL::Biomol::MMCIFData::Item::getNumValues | ( | ) | const |
Returns the number of values stored in the item.
| void CDPL::Biomol::MMCIFData::Item::clear | ( | ) |
Removes all values from the item.
| const std::string& CDPL::Biomol::MMCIFData::Item::getValue | ( | std::size_t | index | ) | const |
Returns the value at the zero-based index index.
| index | The zero-based value index. |
const reference to the value. | Base::IndexError | if the number of values is zero or index is not in the range [0, getNumValues() - 1]. |
| void CDPL::Biomol::MMCIFData::Item::setValue | ( | std::size_t | index, |
| const std::string & | value | ||
| ) |
Replaces the value at the zero-based index index by value.
| index | The zero-based value index. |
| value | The new value. |
| Base::IndexError | if the number of values is zero or index is not in the range [0, getNumValues() - 1]. |
| void CDPL::Biomol::MMCIFData::Item::setValue | ( | std::size_t | index, |
| std::string && | 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]. |
| void CDPL::Biomol::MMCIFData::Item::addValue | ( | const std::string & | value | ) |
Appends the value value to the item's value list.
| value | The value to append. |
| void CDPL::Biomol::MMCIFData::Item::addValue | ( | std::string && | value | ) |
Appends the value value to the item's value list by moving.
| value | The value to move-append. |
| ValueIterator CDPL::Biomol::MMCIFData::Item::removeValue | ( | const ValueIterator & | it | ) |
Removes the value pointed to by the iterator it.
| it | An iterator pointing to the value to remove. |
| void CDPL::Biomol::MMCIFData::Item::removeValue | ( | std::size_t | 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]. |
| void CDPL::Biomol::MMCIFData::Item::swap | ( | Item & | item | ) |
Swaps the contents of this item with those of item.
| item | The other item to swap with. |
| ConstValueIterator CDPL::Biomol::MMCIFData::Item::getValuesBegin | ( | ) | const |
Returns a constant iterator pointing to the beginning of the value list.
| ValueIterator CDPL::Biomol::MMCIFData::Item::getValuesBegin | ( | ) |
Returns a mutable iterator pointing to the beginning of the value list.
| ConstValueIterator CDPL::Biomol::MMCIFData::Item::getValuesEnd | ( | ) | const |
Returns a constant iterator pointing one past the last value.
| ValueIterator CDPL::Biomol::MMCIFData::Item::getValuesEnd | ( | ) |
Returns a mutable iterator pointing one past the last value.
| ConstValueIterator CDPL::Biomol::MMCIFData::Item::begin | ( | ) | const |
Returns a constant iterator pointing to the beginning of the value list (alias of getValuesBegin()).
| ValueIterator CDPL::Biomol::MMCIFData::Item::begin | ( | ) |
Returns a mutable iterator pointing to the beginning of the value list (alias of getValuesBegin()).
| ConstValueIterator CDPL::Biomol::MMCIFData::Item::end | ( | ) | const |
Returns a constant iterator pointing one past the last value (alias of getValuesEnd()).
| ValueIterator CDPL::Biomol::MMCIFData::Item::end | ( | ) |
Returns a mutable iterator pointing one past the last value (alias of getValuesEnd()).