Chemical Data Processing Library C++ API - Version 1.1.1
Pharmacophore.hpp
Go to the documentation of this file.
1 /*
2  * Pharmacophore.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_PHARM_PHARMACOPHORE_HPP
30 #define CDPL_PHARM_PHARMACOPHORE_HPP
31 
32 #include <memory>
33 
34 #include "CDPL/Pharm/APIPrefix.hpp"
36 
37 
38 namespace CDPL
39 {
40 
41  namespace Pharm
42  {
43 
48  {
49 
50  public:
54  typedef std::shared_ptr<Pharmacophore> SharedPointer;
55 
60 
65 
69  virtual ~Pharmacophore() {}
70 
73 
77  virtual void clear() = 0;
78 
83  virtual std::size_t getNumFeatures() const = 0;
84 
91  virtual const Feature& getFeature(std::size_t idx) const = 0;
92 
99  virtual Feature& getFeature(std::size_t idx) = 0;
100 
105  virtual Feature& addFeature() = 0;
106 
112  virtual void removeFeature(std::size_t idx) = 0;
113 
122 
129  virtual std::size_t getFeatureIndex(const Feature& feature) const = 0;
130 
136  virtual bool containsFeature(const Feature& feature) const = 0;
137 
143  virtual void copy(const Pharmacophore& pharm) = 0;
144 
150  virtual void copy(const FeatureContainer& cntnr) = 0;
151 
158  virtual void append(const Pharmacophore& pharm) = 0;
159 
166  virtual void append(const FeatureContainer& cntnr) = 0;
167 
173  virtual void remove(const FeatureContainer& cntnr) = 0;
174 
179  virtual SharedPointer clone() const = 0;
180 
190  Pharmacophore& operator=(const Pharmacophore& pharm);
191 
201  Pharmacophore& operator=(const FeatureContainer& cntnr);
202 
212  Pharmacophore& operator+=(const Pharmacophore& pharm);
213 
223  Pharmacophore& operator+=(const FeatureContainer& cntnr);
224 
234  };
235  } // namespace Pharm
236 } // namespace CDPL
237 
238 #endif // CDPL_PHARM_PHARMACOPHORE_HPP
APIPrefix.hpp
Definition of the preprocessor macro CDPL_PHARM_API.
CDPL_PHARM_API
#define CDPL_PHARM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::Pharm::Pharmacophore::getFeature
virtual Feature & getFeature(std::size_t idx)=0
Returns a non-const reference to the pharmacophore feature at index idx.
CDPL::Pharm::Pharmacophore::getNumFeatures
virtual std::size_t getNumFeatures() const =0
Returns the number of pharmacophore features.
CDPL::Pharm::Pharmacophore::containsFeature
virtual bool containsFeature(const Feature &feature) const =0
Tells whether the specified feature instance is stored in this pharmacophore.
CDPL::Pharm::Pharmacophore::removeFeature
FeatureIterator removeFeature(const FeatureIterator &it)
Removes the pharmacophore feature specified by the iterator it.
CDPL::Pharm::Pharmacophore::copy
virtual void copy(const Pharmacophore &pharm)=0
Replaces the current set of pharmacophore features and properties by a copy of the features and prope...
CDPL::Pharm::Pharmacophore::copy
virtual void copy(const FeatureContainer &cntnr)=0
Replaces the current set of pharmacophore features and properties by a copy of the features and prope...
FeatureContainer.hpp
Definition of the class CDPL::Pharm::FeatureContainer.
CDPL::Pharm::Pharmacophore::remove
virtual void remove(const FeatureContainer &cntnr)=0
Removes the pharmacophore features referenced by the feature container cntnr from this Pharmacophore ...
CDPL::Util::IndexedElementIterator
A STL compatible random access iterator for container elements accessible by index.
Definition: IndexedElementIterator.hpp:125
CDPL::Pharm::Pharmacophore::addFeature
virtual Feature & addFeature()=0
Creates a new pharmacophore feature and adds it to the pharmacophore.
CDPL::Pharm::FeatureContainer
FeatureContainer.
Definition: FeatureContainer.hpp:53
CDPL::Pharm::Pharmacophore::ConstFeatureIterator
FeatureContainer::ConstFeatureIterator ConstFeatureIterator
A constant random access iterator used to iterate over the stored const Pharm::Feature objects.
Definition: Pharmacophore.hpp:59
CDPL::Pharm::Pharmacophore::clear
virtual void clear()=0
Removes all features and clears all properties of the pharmacophore.
CDPL::Pharm::FeatureContainer::SharedPointer
std::shared_ptr< FeatureContainer > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated FeatureContainer instances.
Definition: FeatureContainer.hpp:56
CDPL::Pharm::Pharmacophore::removeFeature
virtual void removeFeature(std::size_t idx)=0
Removes the pharmacophore feature at the specified index.
CDPL::Pharm::Pharmacophore
Pharmacophore.
Definition: Pharmacophore.hpp:48
CDPL::Pharm::Pharmacophore::operator-=
Pharmacophore & operator-=(const FeatureContainer &cntnr)
Removes the pharmacophore features referenced by the feature container cntnr from this Pharmacophore ...
CDPL::Pharm::Pharmacophore::getFeature
virtual const Feature & getFeature(std::size_t idx) const =0
Returns a const reference to the pharmacophore feature at index idx.
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::Pharm::Pharmacophore::~Pharmacophore
virtual ~Pharmacophore()
Virtual destructor.
Definition: Pharmacophore.hpp:69
CDPL::Pharm::Pharmacophore::append
virtual void append(const FeatureContainer &cntnr)=0
Extends the current set of pharmacophore features by a copy of the features in the feature container ...
CDPL::Pharm::Pharmacophore::getFeatureIndex
virtual std::size_t getFeatureIndex(const Feature &feature) const =0
Returns the index of the specified feature in this pharmacophore.
CDPL::Pharm::FeatureContainer::getFeaturesBegin
ConstFeatureIterator getFeaturesBegin() const
Returns a constant iterator pointing to the beginning of the stored const Pharm::Feature objects.
CDPL::Pharm::FeatureContainer::getFeaturesEnd
ConstFeatureIterator getFeaturesEnd() const
Returns a constant iterator pointing to the end of the stored const Pharm::Feature objects.
CDPL::Pharm::Pharmacophore::append
virtual void append(const Pharmacophore &pharm)=0
Extends the current set of pharmacophore features by a copy of the features in the pharmacophore phar...
CDPL::Pharm::Pharmacophore::SharedPointer
std::shared_ptr< Pharmacophore > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated Pharmacophore instances.
Definition: Pharmacophore.hpp:54
CDPL::Pharm::Pharmacophore::FeatureIterator
FeatureContainer::FeatureIterator FeatureIterator
A mutable random access iterator used to iterate over the stored Pharm::Feature objects.
Definition: Pharmacophore.hpp:64
CDPL::Pharm::Feature
Feature.
Definition: Feature.hpp:48
CDPL::Pharm::Pharmacophore::clone
virtual SharedPointer clone() const =0
Creates a copy of the current pharmacophore state.