Chemical Data Processing Library C++ API - Version 1.1.1
Public Types | List of all members
CDPL::MolProp::MassComposition Class Reference

A data type for the storage of mass percent compositions of chemical compounds. More...

#include <MassComposition.hpp>

+ Inheritance diagram for CDPL::MolProp::MassComposition:

Public Types

typedef std::shared_ptr< MassCompositionSharedPointer
 
- Public Types inherited from CDPL::Util::Map< unsigned int, double, true >
typedef std::shared_ptr< MapSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated Map instances. More...
 
typedef unsigned int KeyType
 The type of the map's keys. More...
 
typedef double ValueType
 The type of the mapped values. More...
 
typedef StorageType::value_type Entry
 The type of the key/value pairs stored in the map. More...
 
typedef StorageType::const_iterator ConstEntryIterator
 A constant iterator used to iterate over the entries of the map. More...
 
typedef StorageType::const_reverse_iterator ConstReverseEntryIterator
 A constant iterator used to iterate backwards over the entries of the map. More...
 
typedef StorageType::iterator EntryIterator
 A mutable iterator used to iterate over the entries of the map. More...
 
typedef StorageType::reverse_iterator ReverseEntryIterator
 A mutable iterator used to iterate backwards over the entries of the map. More...
 

Additional Inherited Members

- Public Member Functions inherited from CDPL::Util::Map< unsigned int, double, true >
 Map ()
 Creates an empty map. More...
 
 Map (const std::less< unsigned int > &func)
 Creates an empty map and uses func as key compare function. More...
 
 Map (const InputIter &first, const InputIter &last)
 Creates and initializes the map with copies of the key value pairs in the range [first, last). More...
 
 Map (const InputIter &first, const InputIter &last, const std::less< unsigned int > &func)
 Creates and initializes the map with copies of the key value pairs in the range [first, last) and uses func as key compare function. More...
 
virtual ~Map ()
 Virtual destructor. More...
 
StorageType & getData ()
 
const StorageType & getData () const
 
std::size_t getSize () const
 Returns the size (number of entries) of the map. More...
 
bool isEmpty () const
 Tells whether the map is empty (getSize() == 0). More...
 
void clear ()
 Erases all entries. More...
 
void swap (Map &map)
 Swaps the contents with map. More...
 
std::less< unsigned int > getKeyCompareFunction () const
 Returns the key compare function used by the map. More...
 
EntryIterator getEntry (const unsigned int &key)
 Returns a mutable iterator pointing to the entry specified by key. More...
 
ConstEntryIterator getEntry (const unsigned int &key) const
 Returns a constant iterator pointing to the entry specified by key. More...
 
bool containsEntry (const unsigned int &key) const
 Tells whether the map contains an entry with the specified key. More...
 
doublegetValue (const unsigned int &key)
 Returns a non-const reference to the value associated with the specified key. More...
 
doublegetValue (const unsigned int &key, double &def_value)
 Returns a non-const reference to the value associated with the specified key, or the value given by the second argument if the specified entry does not exist. More...
 
const doublegetValue (const unsigned int &key) const
 Returns a const reference to the value associated with the specified key. More...
 
const doublegetValue (const unsigned int &key, const double &def_value) const
 Returns a const reference to the value associated with the specified key, or the value given by the second argument if the specified entry does not exist. More...
 
doubleoperator[] (const unsigned int &key)
 Returns a non-const reference to the value associated with the specified key. More...
 
const doubleoperator[] (const unsigned int &key) const
 Returns a const reference to the value associated with the specified key. More...
 
void removeEntry (const EntryIterator &it)
 Removes the entry pointed to by the iterator it from the map. More...
 
bool removeEntry (const unsigned int &key)
 Removes the entry specified by key from the map. More...
 
void removeEntries (const EntryIterator &first, const EntryIterator &last)
 Removes all entries pointed to by the iterators in the range [first, last) from the map. More...
 
std::pair< EntryIterator, boolinsertEntry (const Entry &item)
 Tries to insert the key/value pair item into the map. More...
 
std::pair< EntryIterator, boolinsertEntry (const unsigned int &key, const double &value)
 Tries to insert a new entry with specified key and value into the map. More...
 
EntryIterator insertEntry (const EntryIterator &it, const Entry &item)
 Tries to insert the key/value pair item into the map and uses the iterator it as a hint for the insertion location. More...
 
EntryIterator insertEntry (const EntryIterator &it, const unsigned int &key, const double &value)
 Tries to insert a new entry with the specified key and value into the map and uses the iterator it as a hint for the insertion location. More...
 
EntryIterator setEntry (const Entry &item)
 Inserts a new entry or updates the value of an existing entry with the key and value given by item. More...
 
EntryIterator setEntry (const unsigned int &key, const double &value)
 Inserts a new entry or updates the value of an existing entry with the specified key and value. More...
 
void insertEntries (const InputIter &first, const InputIter &last)
 Tries to insert the key/value pairs in the range [first, last). More...
 
void setEntries (const InputIter &first, const InputIter &last)
 Inserts new entries or updates the value of existing entries using the key/value pairs in the range [first, last). More...
 
EntryIterator getLowerBound (const unsigned int &key)
 Returns a mutable iterator pointing to the first entry whose key is not less than the specified key. More...
 
ConstEntryIterator getLowerBound (const unsigned int &key) const
 Returns a constant iterator pointing to the first entry whose key is not less than the specified key. More...
 
EntryIterator getUpperBound (const unsigned int &key)
 Returns a mutable iterator pointing to the first entry whose key is greater than the specified key. More...
 
ConstEntryIterator getUpperBound (const unsigned int &key) const
 Returns a constant iterator pointing to the first entry whose key is greater than the specified key. More...
 
ConstEntryIterator getEntriesBegin () const
 Returns a constant iterator pointing to the beginning of the map. More...
 
EntryIterator getEntriesBegin ()
 Returns a mutable iterator pointing to the beginning of the map. More...
 
ConstEntryIterator getEntriesEnd () const
 Returns a constant iterator pointing to the end of the map. More...
 
EntryIterator getEntriesEnd ()
 Returns a mutable iterator pointing to the end of the map. More...
 
ConstEntryIterator begin () const
 Returns a constant iterator pointing to the beginning of the map. More...
 
EntryIterator begin ()
 Returns a mutable iterator pointing to the beginning of the map. More...
 
ConstEntryIterator end () const
 Returns a constant iterator pointing to the end of the map. More...
 
EntryIterator end ()
 Returns a mutable iterator pointing to the end of the map. More...
 
ConstReverseEntryIterator getEntriesReverseBegin () const
 Returns a constant iterator pointing to the beginning of the reversed map. More...
 
ReverseEntryIterator getEntriesReverseBegin ()
 Returns a mutable iterator pointing to the beginning of the reversed map. More...
 
ConstReverseEntryIterator getEntriesReverseEnd () const
 Returns a constant iterator pointing to the end of the reversed map. More...
 
ReverseEntryIterator getEntriesReverseEnd ()
 Returns a mutable iterator pointing to the end of the reversed map. More...
 
- Protected Member Functions inherited from CDPL::Util::Map< unsigned int, double, true >
virtual const char * getClassName () const
 Returns the name of the (derived) Map class. More...
 

Detailed Description

A data type for the storage of mass percent compositions of chemical compounds.

MassComposition is an unique associative map where the keys specify the atom type (defined in namespace Chem::AtomType) of the chemical elements and the mapped floating-point values correspond to the percentage contribution of the elements to the total mass of the compound.

Member Typedef Documentation

◆ SharedPointer


The documentation for this class was generated from the following file: