Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __CHEMICALFEATUREFACTORY_H_02122004_1545__
00011 #define __CHEMICALFEATUREFACTORY_H_02122004_1545__
00012
00013 #include "MolChemicalFeatureDef.h"
00014 #include <iostream>
00015 #include <boost/shared_ptr.hpp>
00016
00017 namespace RDKit {
00018 class MolChemicalFeature;
00019 typedef boost::shared_ptr<MolChemicalFeature> FeatSPtr;
00020 typedef std::list< FeatSPtr > FeatSPtrList;
00021 typedef FeatSPtrList::iterator FeatSPtrList_I;
00022
00023
00024 class MolChemicalFeatureFactory {
00025 public:
00026
00027
00028 int getNumFeatureDefs() const {return d_featDefs.size();};
00029
00030
00031 MolChemicalFeatureDef::CollectionType::iterator
00032 beginFeatureDefs() { return d_featDefs.begin(); };
00033
00034 MolChemicalFeatureDef::CollectionType::iterator
00035 endFeatureDefs() { return d_featDefs.end(); };
00036
00037
00038 MolChemicalFeatureDef::CollectionType::const_iterator
00039 beginFeatureDefs() const { return d_featDefs.begin(); };
00040
00041 MolChemicalFeatureDef::CollectionType::const_iterator
00042 endFeatureDefs() const { return d_featDefs.end(); };
00043
00044
00045 void addFeatureDef(MolChemicalFeatureDef::CollectionType::value_type featDef){
00046 d_featDefs.push_back(featDef);
00047 }
00048
00049
00050
00051
00052
00053
00054
00055 FeatSPtrList getFeaturesForMol(const ROMol &mol,const char *includeOnly="") const;
00056
00057 private:
00058 MolChemicalFeatureDef::CollectionType d_featDefs;
00059 };
00060
00061
00062 MolChemicalFeatureFactory *buildFeatureFactory(std::istream &inStream);
00063
00064 MolChemicalFeatureFactory *buildFeatureFactory(const std::string &featureData);
00065
00066 }
00067
00068 #endif