Chemical Data Processing Library C++ API - Version 1.1.1
Public Types | Public Member Functions | List of all members
CDPL::Chem::ANDMatchExpressionList< ObjType, void > Class Template Reference

ANDMatchExpressionList. More...

#include <ANDMatchExpressionList.hpp>

+ Inheritance diagram for CDPL::Chem::ANDMatchExpressionList< ObjType, void >:

Public Types

typedef std::shared_ptr< ANDMatchExpressionListSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated ANDMatchExpressionList instances. More...
 
- Public Types inherited from CDPL::Chem::MatchExpressionList< ObjType, void >
typedef std::shared_ptr< MatchExpressionListSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated MatchExpressionList instances. More...
 
- Public Types inherited from CDPL::Chem::MatchExpression< ObjType, void >
typedef std::shared_ptr< MatchExpressionSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated MatchExpression instances. More...
 
- Public Types inherited from CDPL::Util::IndirectArray< MatchExpression< ObjType, void > >
typedef Array< typename ValueType::SharedPointer > BaseType
 The type of the public Array<PointerType> base class storing the pointer elements. More...
 
typedef MatchExpression< ObjType, void > ElementType
 The type of the object that is obtained after dereferenciation of a stored pointer element. More...
 
typedef std::shared_ptr< IndirectArraySharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated IndirectArray instances. More...
 
typedef boost::transform_iterator< DerefFunc, typename BaseType::ConstElementIterator, const MatchExpression< ObjType, void > & > ConstElementIterator
 A constant random access iterator used to iterate over the pointed-to objects. More...
 
typedef boost::transform_iterator< DerefFunc, typename BaseType::ConstReverseElementIterator, const MatchExpression< ObjType, void > & > ConstReverseElementIterator
 A constant random access iterator used to iterate over the pointed-to objects in reverse order. More...
 
typedef boost::transform_iterator< DerefFunc, typename BaseType::ElementIterator, MatchExpression< ObjType, void > & > ElementIterator
 A mutable random access iterator used to iterate over the pointed-to objects. More...
 
typedef boost::transform_iterator< DerefFunc, typename BaseType::ReverseElementIterator, MatchExpression< ObjType, void > & > ReverseElementIterator
 A mutable random access iterator used to iterate over the pointed-to objects in reverse order. More...
 
- Public Types inherited from CDPL::Util::Array< typename ValueType::SharedPointer >
typedef std::vector< typename ValueType::SharedPointer > StorageType
 
typedef std::shared_ptr< ArraySharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated Array instances. More...
 
typedef typename ValueType::SharedPointer 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

bool operator() (const ObjType &query_obj, const ObjType &target_obj, const Base::Any &aux_data) const
 Performs an evaluation of the conjunctive expression list for the given query and target objects. More...
 
bool operator() (const ObjType &query_obj, const ObjType &target_obj, const AtomBondMapping &mapping, const Base::Any &aux_data) const
 Performs an evaluation of the conjunctive expression list for the given query and target objects under consideration of the provided candidate atom/bond mapping. More...
 
- Public Member Functions inherited from CDPL::Chem::MatchExpressionList< ObjType, void >
bool requiresAtomBondMapping () const
 Tells whether the expression list requires a reevaluation after a query to target object mapping candidate has been found. More...
 
- Public Member Functions inherited from CDPL::Chem::MatchExpression< ObjType, void >
virtual ~MatchExpression ()
 Virtual Destructor. More...
 
virtual bool requiresAtomBondMapping () const
 Tells whether the expression must be reevaluated after a query to target atom/bond mapping candidate has been found. More...
 
- Public Member Functions inherited from CDPL::Util::IndirectArray< MatchExpression< ObjType, void > >
 IndirectArray ()
 Creates an empty array. More...
 
 IndirectArray (std::size_t num_elem, const typename ValueType::SharedPointer &ptr=typename ValueType::SharedPointer())
 Creates and initializes the array with num_elem copies of ptr. More...
 
 IndirectArray (const InputIter &first, const InputIter &last)
 Creates and initializes the array with copies of the pointers in the range [first, last). More...
 
virtual ~IndirectArray ()
 Virtual destructor. More...
 
ElementIterator insertElement (const ElementIterator &it, const typename ValueType::SharedPointer &ptr)
 Inserts a new element before the location specified by the iterator it. More...
 
void insertElement (std::size_t idx, const MatchExpression< ObjType, void > &value=MatchExpression< ObjType, void >())
 Inserts a new element before the location specified by the index idx. More...
 
ElementIterator insertElement (const ElementIterator &it, const MatchExpression< ObjType, void > &value=MatchExpression< ObjType, void >())
 Inserts a new element before the location specified by the iterator it. More...
 
void insertElements (const ElementIterator &it, std::size_t num_elem, const typename ValueType::SharedPointer &ptr)
 Inserts num_elem copies of ptr before the location specified by the iterator it. More...
 
void insertElements (const ElementIterator &it, const InputIter &first, const InputIter &last)
 Inserts the range of pointers [first, last) before the location specified by the iterator it. More...
 
void insertElements (std::size_t idx, std::size_t num_elem, const MatchExpression< ObjType, void > &value=MatchExpression< ObjType, void >())
 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 MatchExpression< ObjType, void > &value=MatchExpression< ObjType, void >())
 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...
 
ElementIterator removeElement (const ElementIterator &it)
 Removes the element at the position specified by the iterator it. 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...
 
ElementIterator removeElements (const ElementIterator &first, const ElementIterator &last)
 Removes the elements pointed to by the iterators in the range [first, last). More...
 
const MatchExpression< ObjType, void > & getFirstElement () const
 Returns a const reference to the object pointed to by the first element of the array. More...
 
MatchExpression< ObjType, void > & getFirstElement ()
 Returns a non-const reference to the object pointed to by the first element of the array. More...
 
const MatchExpression< ObjType, void > & getLastElement () const
 Returns a const reference to the object pointed to by the last element of the array. More...
 
MatchExpression< ObjType, void > & getLastElement ()
 Returns a non-const reference to the object pointed to by the last element of the array. More...
 
ConstElementIterator getElementsBegin () const
 Returns a constant iterator over the pointed-to objects that points to the beginning of the array. More...
 
ElementIterator getElementsBegin ()
 Returns a mutable iterator over the pointed-to objects that points to the beginning of the array. More...
 
ConstElementIterator getElementsEnd () const
 Returns a constant iterator over the pointed-to objects that points to the end of the array. More...
 
ElementIterator getElementsEnd ()
 Returns a mutable iterator over the pointed-to objects that points to the end of the array. More...
 
ConstElementIterator begin () const
 Returns a constant iterator over the pointed-to objects that points to the beginning of the array. More...
 
ElementIterator begin ()
 Returns a mutable iterator over the pointed-to objects that points to the beginning of the array. More...
 
ConstElementIterator end () const
 Returns a constant iterator over the pointed-to objects that points to the end of the array. More...
 
ElementIterator end ()
 Returns a mutable iterator over the pointed-to objects that points to the end of the array. More...
 
ConstReverseElementIterator getElementsReverseBegin () const
 Returns a constant iterator over the pointed-to objects that points to the beginning of the reversed array. More...
 
ReverseElementIterator getElementsReverseBegin ()
 Returns a mutable iterator over the pointed-to objects that points to the beginning of the reversed array. More...
 
ConstReverseElementIterator getElementsReverseEnd () const
 Returns a constant iterator over the pointed-to objects that points to the end of the reversed array. More...
 
ReverseElementIterator getElementsReverseEnd ()
 Returns a mutable iterator over the pointed-to objects that points to the end of the reversed array. More...
 
const MatchExpression< ObjType, void > & getElement (std::size_t idx) const
 Returns a const reference to the object pointed-to by the pointer element at index idx. More...
 
MatchExpression< ObjType, void > & getElement (std::size_t idx)
 Returns a non-const reference to the object pointed-to by the pointer element at index idx. More...
 
const MatchExpression< ObjType, void > & operator[] (std::size_t idx) const
 Returns a const reference to the object pointed-to by the pointer element at index idx. More...
 
MatchExpression< ObjType, void > & operator[] (std::size_t idx)
 Returns a non-const reference to the object pointed-to by the pointer element at index idx. More...
 
- Public Member Functions inherited from CDPL::Util::Array< typename ValueType::SharedPointer >
 Array ()
 Creates an empty array. More...
 
 Array (std::size_t num_elem, const typename ValueType::SharedPointer &value=typename ValueType::SharedPointer())
 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...
 
StorageTypegetData ()
 
const StorageTypegetData () const
 
BaseTypegetBase ()
 Returns a non-const reference to itself. More...
 
const BaseTypegetBase () 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 typename ValueType::SharedPointer &value=typename ValueType::SharedPointer())
 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 typename ValueType::SharedPointer &value=typename ValueType::SharedPointer())
 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 typename ValueType::SharedPointer &value=typename ValueType::SharedPointer())
 Inserts a new element at the end of the array. More...
 
void insertElement (std::size_t idx, const typename ValueType::SharedPointer &value=typename ValueType::SharedPointer())
 Inserts a new element before the location specified by the index idx. More...
 
ElementIterator insertElement (const ElementIterator &it, const typename ValueType::SharedPointer &value=typename ValueType::SharedPointer())
 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 typename ValueType::SharedPointer &value=typename ValueType::SharedPointer())
 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 typename ValueType::SharedPointer &value=typename ValueType::SharedPointer())
 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 typename ValueType::SharedPointer & getFirstElement () const
 Returns a const reference to the first element of the array. More...
 
typename ValueType::SharedPointer & getFirstElement ()
 Returns a non-const reference to the first element of the array. More...
 
const typename ValueType::SharedPointer & getLastElement () const
 Returns a const reference to the last element of the array. More...
 
typename ValueType::SharedPointer & 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 typename ValueType::SharedPointer & getElement (std::size_t idx) const
 Returns a const reference to the element at index idx. More...
 
typename ValueType::SharedPointer & getElement (std::size_t idx)
 Returns a non-const reference to the element at index idx. More...
 
void setElement (std::size_t idx, const typename ValueType::SharedPointer &value=typename ValueType::SharedPointer())
 Assigns a new value to the element specified by the index idx. More...
 
const typename ValueType::SharedPointer & operator[] (std::size_t idx) const
 Returns a const reference to the element at index idx. More...
 
typename ValueType::SharedPointer & 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< typename ValueType::SharedPointer >
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
 

Detailed Description

template<typename ObjType>
class CDPL::Chem::ANDMatchExpressionList< ObjType, void >

ANDMatchExpressionList.

Template Parameters
ObjTypeThe type of the query/target objects for which the expression list gets evaluated.

Member Typedef Documentation

◆ SharedPointer

template<typename ObjType >
typedef std::shared_ptr<ANDMatchExpressionList> CDPL::Chem::ANDMatchExpressionList< ObjType, void >::SharedPointer

A reference-counted smart pointer [SHPTR] for dynamically allocated ANDMatchExpressionList instances.

Member Function Documentation

◆ operator()() [1/2]

template<typename ObjType >
bool CDPL::Chem::ANDMatchExpressionList< ObjType, void >::operator() ( const ObjType &  query_obj,
const ObjType &  target_obj,
const Base::Any aux_data 
) const
virtual

Performs an evaluation of the conjunctive expression list for the given query and target objects.

Parameters
query_objThe query object.
target_objThe target object.
aux_dataProvides auxiliary information for the evaluation of the expression list.
Returns
true if all expression list elements evaluate to true, and false otherwise.
Note
If the list is empty, the expression list evaluates to true.

Reimplemented from CDPL::Chem::MatchExpression< ObjType, void >.

◆ operator()() [2/2]

template<typename ObjType >
bool CDPL::Chem::ANDMatchExpressionList< ObjType, void >::operator() ( const ObjType &  query_obj,
const ObjType &  target_obj,
const AtomBondMapping mapping,
const Base::Any aux_data 
) const
virtual

Performs an evaluation of the conjunctive expression list for the given query and target objects under consideration of the provided candidate atom/bond mapping.

Parameters
query_objThe query object.
target_objThe target object.
mappingThe current query to target atom/bond mapping candidate to evaluate.
aux_dataProvides auxiliary information for the evaluation of the expression list.
Returns
true if all expression list elements evaluate to true, and false otherwise.
Note
If the list is empty, the expression list evaluates to true.

Reimplemented from CDPL::Chem::MatchExpression< ObjType, void >.


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