00001 /** 00002 * \file SingletonFilter.h \brief A filter for particles. 00003 * 00004 * This file is generated by a script (core/tools/make-containers). 00005 * Do not edit directly. 00006 * 00007 * Copyright 2007-2010 IMP Inventors. All rights reserved. 00008 */ 00009 00010 #ifndef IMP_SINGLETON_FILTER_H 00011 #define IMP_SINGLETON_FILTER_H 00012 00013 #include "kernel_config.h" 00014 #include "Particle.h" 00015 #include "utility.h" 00016 #include "VersionInfo.h" 00017 #include "base_types.h" 00018 #include "VersionInfo.h" 00019 00020 IMP_BEGIN_NAMESPACE 00021 00022 00023 //! A shared filter for particles 00024 /** Stores a searchable shared collection of particles. 00025 \ingroup restraints 00026 00027 Implementors should see IMP_SINGLETON_FILTER(). 00028 */ 00029 class IMPEXPORT SingletonFilter : public Object 00030 { 00031 public: 00032 SingletonFilter(std::string name="SingletonFilter %1%"); 00033 00034 /** \note This function may be linear. Be aware of the complexity 00035 bounds of your particular filter. 00036 */ 00037 virtual bool get_contains_particle(Particle* p) const =0; 00038 00039 /** \name Interactions 00040 Return the set of particles used when applied to the passed 00041 list. 00042 @{ 00043 */ 00044 virtual ParticlesTemp get_input_particles(Particle* p) const=0; 00045 virtual ObjectsTemp get_input_objects(Particle* p) const=0; 00046 /** @} */ 00047 00048 IMP_REF_COUNTED_DESTRUCTOR(SingletonFilter); 00049 }; 00050 00051 IMP_OUTPUT_OPERATOR(SingletonFilter); 00052 00053 IMP_OBJECTS(SingletonFilter); 00054 00055 IMP_END_NAMESPACE 00056 00057 #endif /* IMP_SINGLETON_FILTER_H */