Chemical Data Processing Library C++ API - Version 1.1.1
|
#include <MatchConstraintList.hpp>
Public Types | |
enum | Type { AND_LIST, NOT_AND_LIST, OR_LIST, NOT_OR_LIST } |
Defines constants that describe the logical type of the match constraint list. More... | |
typedef std::shared_ptr< MatchConstraintList > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated MatchConstraintList instances. More... | |
Public Types inherited from CDPL::Util::Array< MatchConstraint > | |
typedef std::vector< MatchConstraint > | StorageType |
typedef std::shared_ptr< Array > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated Array instances. More... | |
typedef MatchConstraint | ElementType |
The type of objects stored by the array. More... | |
typedef std::size_t | SizeType |
The type of objects stored by the array. More... | |
typedef Array | BaseType |
Specifies for derived classes the type of the Array base class. More... | |
typedef StorageType::const_iterator | ConstElementIterator |
A constant random access iterator used to iterate over the elements of the array. More... | |
typedef StorageType::const_reverse_iterator | ConstReverseElementIterator |
A constant random access iterator used to iterate over the elements of the array in reverse order. More... | |
typedef StorageType::iterator | ElementIterator |
A mutable random access iterator used to iterate over the elements of the array. More... | |
typedef StorageType::reverse_iterator | ReverseElementIterator |
A mutable random access iterator used to iterate over the elements of the array in reverse order. More... | |
Public Member Functions | |
MatchConstraintList (Type type=AND_LIST) | |
Constructs a MatchConstraintList object with the specified logical type. More... | |
Type | getType () const |
Returns the logical type of the match constraint list. More... | |
void | setType (Type type) |
Sets the logical type of the match constraint list. More... | |
void | addElement (unsigned int id, MatchConstraint::Relation rel) |
Appends a new Chem::MatchConstraint element with the given identifier and relational constraint on the values of matching query/target attribute pairs. More... | |
template<typename T > | |
void | addElement (unsigned int id, MatchConstraint::Relation rel, T &&val) |
Appends a new Chem::MatchConstraint element with the given identifier, relational constraint on the values of matching query/target attribute pairs and value of the query attribute. More... | |
Public Member Functions inherited from CDPL::Util::Array< MatchConstraint > | |
Array () | |
Creates an empty array. More... | |
Array (std::size_t num_elem, const MatchConstraint &value=MatchConstraint()) | |
Creates and initializes the array with num_elem copies of value. More... | |
Array (const InputIter &first, const InputIter &last) | |
Creates and initializes the array with copies of the elements in the range [first, last). More... | |
virtual | ~Array () |
Virtual destructor. More... | |
StorageType & | getData () |
const StorageType & | getData () const |
BaseType & | getBase () |
Returns a non-const reference to itself. More... | |
const BaseType & | getBase () const |
Returns a const reference to itself. More... | |
std::size_t | getSize () const |
Returns the number of elements stored in the array. More... | |
std::size_t | size () const |
Returns the number of elements stored in the array. More... | |
bool | isEmpty () const |
Tells whether the array is empty (getSize() == 0). More... | |
void | resize (std::size_t num_elem, const MatchConstraint &value=MatchConstraint()) |
Inserts or erases elements at the end so that the size becomes num_elem. More... | |
void | reserve (std::size_t num_elem) |
Preallocates memory for (at least) num_elem elements. More... | |
std::size_t | getCapacity () const |
Returns the number of elements for which memory has been allocated. More... | |
void | clear () |
Erases all elements. More... | |
void | swap (Array &array) |
Swaps the contents with array. More... | |
void | assign (std::size_t num_elem, const MatchConstraint &value=MatchConstraint()) |
This function fills the array with num_elem copies of the given value. More... | |
void | assign (const InputIter &first, const InputIter &last) |
This function fills a vector with copies of the elements in the range [first, last). More... | |
void | addElement (const MatchConstraint &value=MatchConstraint()) |
Inserts a new element at the end of the array. More... | |
void | insertElement (std::size_t idx, const MatchConstraint &value=MatchConstraint()) |
Inserts a new element before the location specified by the index idx. More... | |
ElementIterator | insertElement (const ElementIterator &it, const MatchConstraint &value=MatchConstraint()) |
Inserts a new element before the location specified by the iterator it. More... | |
void | insertElements (std::size_t idx, std::size_t num_elem, const MatchConstraint &value=MatchConstraint()) |
Inserts num_elem copies of value before the location specified by the index idx. More... | |
void | insertElements (const ElementIterator &it, std::size_t num_elem, const MatchConstraint &value=MatchConstraint()) |
Inserts num_elem copies of value before the location specified by the iterator it. More... | |
void | insertElements (std::size_t idx, const InputIter &first, const InputIter &last) |
Inserts the range of elements [first, last) before the location specified by the index idx. More... | |
void | insertElements (const ElementIterator &it, const InputIter &first, const InputIter &last) |
Inserts the range of elements [first, last) before the location specified by the iterator it. More... | |
void | popLastElement () |
Removes the last element of the array. More... | |
void | removeElement (std::size_t idx) |
Removes the element at the position specified by the index idx. More... | |
ElementIterator | removeElement (const ElementIterator &it) |
Removes the element at the position specified by the iterator it. More... | |
ElementIterator | removeElements (const ElementIterator &first, const ElementIterator &last) |
Removes the elements pointed to by the iterators in the range [first, last). More... | |
const MatchConstraint & | getFirstElement () const |
Returns a const reference to the first element of the array. More... | |
MatchConstraint & | getFirstElement () |
Returns a non-const reference to the first element of the array. More... | |
const MatchConstraint & | getLastElement () const |
Returns a const reference to the last element of the array. More... | |
MatchConstraint & | getLastElement () |
Returns a non-const reference to the last element of the array. More... | |
ConstElementIterator | getElementsBegin () const |
Returns a constant iterator pointing to the beginning of the array. More... | |
ElementIterator | getElementsBegin () |
Returns a mutable iterator pointing to the beginning of the array. More... | |
ConstElementIterator | getElementsEnd () const |
Returns a constant iterator pointing to the end of the array. More... | |
ElementIterator | getElementsEnd () |
Returns a mutable iterator pointing to the end of the array. More... | |
ConstElementIterator | begin () const |
Returns a constant iterator pointing to the beginning of the array. More... | |
ElementIterator | begin () |
Returns a mutable iterator pointing to the beginning of the array. More... | |
ConstElementIterator | end () const |
Returns a constant iterator pointing to the end of the array. More... | |
ElementIterator | end () |
Returns a mutable iterator pointing to the end of the array. More... | |
ConstReverseElementIterator | getElementsReverseBegin () const |
Returns a constant iterator pointing to the beginning of the reversed array. More... | |
ReverseElementIterator | getElementsReverseBegin () |
Returns a mutable iterator pointing to the beginning of the reversed array. More... | |
ConstReverseElementIterator | getElementsReverseEnd () const |
Returns a constant iterator pointing to the end of the reversed array. More... | |
ReverseElementIterator | getElementsReverseEnd () |
Returns a mutable iterator pointing to the end of the reversed array. More... | |
const MatchConstraint & | getElement (std::size_t idx) const |
Returns a const reference to the element at index idx. More... | |
MatchConstraint & | getElement (std::size_t idx) |
Returns a non-const reference to the element at index idx. More... | |
void | setElement (std::size_t idx, const MatchConstraint &value=MatchConstraint()) |
Assigns a new value to the element specified by the index idx. More... | |
const MatchConstraint & | operator[] (std::size_t idx) const |
Returns a const reference to the element at index idx. More... | |
MatchConstraint & | operator[] (std::size_t idx) |
Returns a non-const reference to the element at index idx. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CDPL::Util::Array< MatchConstraint > | |
void | checkIfNonEmpty () const |
void | checkIndex (std::size_t idx, bool allow_end) const |
void | checkIterator (const ElementIterator &it, bool allow_end) |
void | checkIterator (const ConstElementIterator &it, bool allow_end) const |
virtual const char * | getClassName () const |
Returns the name of the (derived) array class. More... | |
typedef std::shared_ptr<MatchConstraintList> CDPL::Chem::MatchConstraintList::SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated MatchConstraintList
instances.
Defines constants that describe the logical type of the match constraint list.
Constructs a MatchConstraintList
object with the specified logical type.
type | The logical type of the match constraint list. |
Type CDPL::Chem::MatchConstraintList::getType | ( | ) | const |
Returns the logical type of the match constraint list.
void CDPL::Chem::MatchConstraintList::setType | ( | Type | type | ) |
Sets the logical type of the match constraint list.
type | The logical type of the match constraint list. |
void CDPL::Chem::MatchConstraintList::addElement | ( | unsigned int | id, |
MatchConstraint::Relation | rel | ||
) |
Appends a new Chem::MatchConstraint element with the given identifier and relational constraint on the values of matching query/target attribute pairs.
id | The identifier of the match constraint. |
rel | The relational constraint on the values of matching query/target attribute pairs. |
|
inline |
Appends a new Chem::MatchConstraint element with the given identifier, relational constraint on the values of matching query/target attribute pairs and value of the query attribute.
id | The identifier of the match constraint. |
rel | The relational constraint on the values of matching query/target attribute pairs. |
val | The value of the query attribute. |