RDKit::FilterCatalogEntry Class Reference

`#include <FilterCatalogEntry.h>`

Inheritance diagram for RDKit::FilterCatalogEntry:

## Public Member Functions

| FilterCatalogEntry ()
| FilterCatalogEntry (const std::string &name, const FilterMatcherBase &matcher)
| FilterCatalogEntry (const std::string &name, boost::shared_ptr< FilterMatcherBase > matcher)
| FilterCatalogEntry (const FilterCatalogEntry &rhs)
virtual | ~FilterCatalogEntry ()
bool | isValid () const
| Returns true if the Filters stored in this catalog entry are valid. More...
std::string | getDescription () const
| Returns the description of the catalog entry. More...
void | setDescription (const std::string &description)
| Sets the description of the catalog entry. More...
Properties
STR_VECT | getPropList () const
| returns a list with the names of our `properties` More...
template<typename T >
void | setProp (const char *key, T val)
| sets a `property` value More...
template<typename T >
void | setProp (const std::string &key, T val)
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
template<typename T >
void | getProp (const char *key, T &res) const
| allows retrieval of a particular property value More...
template<typename T >
void | getProp (const std::string &key, T &res) const
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
template<typename T >
T | getProp (const char *key) const
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
template<typename T >
T | getProp (const std::string &key) const
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
template<typename T >
bool | getPropIfPresent (const char *key, T &res) const
template<typename T >
bool | getPropIfPresent (const std::string &key, T &res) const
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
bool | hasProp (const char *key) const
| returns whether or not we have a `property` with name `key` More...
bool | hasProp (const std::string &key) const
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
void | clearProp (const char *key)
| clears the value of a `property` More...
void | clearProp (const std::string &key)
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
Dict & | getProps ()
const Dict & | getProps () const
void | setProps (const Dict &props)
bool | getFilterMatches (const ROMol &mol, std::vector< FilterMatch > &matchVect) const
| Returns the matching filters for this catalog entry. More...
bool | hasFilterMatch (const ROMol &mol) const
| Returns true if the filters in this catalog entry match the molecule. More...
virtual void | toStream (std::ostream &ss) const
| serializes (pickles) to a stream More...
virtual std::string | Serialize () const
| returns a string with a serialized (pickled) representation More...
virtual void | initFromStream (std::istream &ss)
| initializes from a stream pickle More...
virtual void | initFromString (const std::string &text)
| initializes from a string pickle More...
Public Member Functions inherited from RDCatalog::CatalogEntry
virtual | ~CatalogEntry ()=0
void | setBitId (int bid)
| sets our bit Id More...
int | getBitId () const
| returns our bit Id More...

## Detailed Description

Definition at line 55 of file FilterCatalogEntry.h.

## Constructor & Destructor Documentation

## FilterCatalogEntry() [1/4]

RDKit::FilterCatalogEntry::FilterCatalogEntry | ( |  | ) |

inline

Definition at line 62 of file FilterCatalogEntry.h.

## FilterCatalogEntry() [2/4]

RDKit::FilterCatalogEntry::FilterCatalogEntry | ( | const std::string & | name,
|  | const FilterMatcherBase & | matcher
| ) |  |

inline

Definition at line 64 of file FilterCatalogEntry.h.

## FilterCatalogEntry() [3/4]

RDKit::FilterCatalogEntry::FilterCatalogEntry | ( | const std::string & | name,
|  | boost::shared_ptr< FilterMatcherBase > | matcher
| ) |  |

inline

Definition at line 69 of file FilterCatalogEntry.h.

## FilterCatalogEntry() [4/4]

RDKit::FilterCatalogEntry::FilterCatalogEntry | ( | const FilterCatalogEntry & | rhs | ) |

inline

Definition at line 75 of file FilterCatalogEntry.h.

## ~FilterCatalogEntry()

virtual RDKit::FilterCatalogEntry::~FilterCatalogEntry | ( |  | ) |

inline virtual

Definition at line 80 of file FilterCatalogEntry.h.

## Member Function Documentation

## clearProp() [1/2]

void RDKit::FilterCatalogEntry::clearProp | ( | const char * | key | ) |

inline

clears the value of a `property`

Definition at line 179 of file FilterCatalogEntry.h.

## clearProp() [2/2]

void RDKit::FilterCatalogEntry::clearProp | ( | const std::string & | key | ) |

inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 184 of file FilterCatalogEntry.h.

References RDKit::Dict::clearVal().

## getDescription()

std::string RDKit::FilterCatalogEntry::getDescription | ( |  | ) | const

virtual

Returns the description of the catalog entry.

Implements RDCatalog::CatalogEntry.

## getFilterMatches()

bool RDKit::FilterCatalogEntry::getFilterMatches | ( | const ROMol & | mol,
|  | std::vector< FilterMatch > & | matchVect
| ) |  | const

inline

Returns the matching filters for this catalog entry.

Definition at line 200 of file FilterCatalogEntry.h.

## getProp() [1/4]

template<typename T >

T RDKit::FilterCatalogEntry::getProp | ( | const char * | key | ) | const

inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 149 of file FilterCatalogEntry.h.

References RDKit::Dict::getVal().

## getProp() [2/4]

template<typename T >

void RDKit::FilterCatalogEntry::getProp | ( | const char * | key,
|  | T & | res
| ) |  | const

inline

allows retrieval of a particular property value

Parameters

  key | the name under which the `property` should be stored. If a `property` is already stored under this name, it will be replaced.
  res | a reference to the storage location for the value.

Notes:

- if no `property` with name `key` exists, a KeyErrorException will be thrown.
- the `boost::lexical_cast` machinery is used to attempt type conversions. If this fails, a `boost::bad_lexical_cast` exception will be thrown.

Definition at line 139 of file FilterCatalogEntry.h.

References RDKit::Dict::getVal().

## getProp() [3/4]

template<typename T >

T RDKit::FilterCatalogEntry::getProp | ( | const std::string & | key | ) | const

inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 154 of file FilterCatalogEntry.h.

References RDKit::Dict::getVal().

## getProp() [4/4]

template<typename T >

void RDKit::FilterCatalogEntry::getProp | ( | const std::string & | key,
|  | T & | res
| ) |  | const

inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 144 of file FilterCatalogEntry.h.

References RDKit::Dict::getVal().

## getPropIfPresent() [1/2]

template<typename T >

bool RDKit::FilterCatalogEntry::getPropIfPresent | ( | const char * | key,
|  | T & | res
| ) |  | const

inline

returns whether or not we have a `property` with name `key` and assigns the value if we do

Definition at line 161 of file FilterCatalogEntry.h.

References RDKit::Dict::getValIfPresent().

## getPropIfPresent() [2/2]

template<typename T >

bool RDKit::FilterCatalogEntry::getPropIfPresent | ( | const std::string & | key,
|  | T & | res
| ) |  | const

inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 166 of file FilterCatalogEntry.h.

References RDKit::Dict::getValIfPresent().

## getPropList()

STR_VECT RDKit::FilterCatalogEntry::getPropList | ( |  | ) | const

inline

returns a list with the names of our `properties`

Definition at line 102 of file FilterCatalogEntry.h.

References RDKit::Dict::keys().

## getProps() [1/2]

Dict& RDKit::FilterCatalogEntry::getProps | ( |  | ) |

inline

Properties usually contain the reference and source for the catalog entry.

Definition at line 190 of file FilterCatalogEntry.h.

## getProps() [2/2]

const Dict& RDKit::FilterCatalogEntry::getProps | ( |  | ) | const

inline

Definition at line 191 of file FilterCatalogEntry.h.

## hasFilterMatch()

bool RDKit::FilterCatalogEntry::hasFilterMatch | ( | const ROMol & | mol | ) | const

inline

Returns true if the filters in this catalog entry match the molecule.

Definition at line 211 of file FilterCatalogEntry.h.

## hasProp() [1/2]

bool RDKit::FilterCatalogEntry::hasProp | ( | const char * | key | ) | const

inline

returns whether or not we have a `property` with name `key`

Definition at line 171 of file FilterCatalogEntry.h.

References RDKit::Dict::hasVal().

## hasProp() [2/2]

bool RDKit::FilterCatalogEntry::hasProp | ( | const std::string & | key | ) | const

inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 173 of file FilterCatalogEntry.h.

References RDKit::Dict::hasVal().

## initFromStream()

virtual void RDKit::FilterCatalogEntry::initFromStream | ( | std::istream & | ss | ) |

virtual

initializes from a stream pickle

Implements RDCatalog::CatalogEntry.

## initFromString()

virtual void RDKit::FilterCatalogEntry::initFromString | ( | const std::string & | text | ) |

virtual

initializes from a string pickle

Implements RDCatalog::CatalogEntry.

## isValid()

bool RDKit::FilterCatalogEntry::isValid | ( |  | ) | const

inline

Returns true if the Filters stored in this catalog entry are valid.

Definition at line 85 of file FilterCatalogEntry.h.

## Serialize()

virtual std::string RDKit::FilterCatalogEntry::Serialize | ( |  | ) | const

virtual

returns a string with a serialized (pickled) representation

Implements RDCatalog::CatalogEntry.

## setDescription()

void RDKit::FilterCatalogEntry::setDescription | ( | const std::string & | description | ) |

Sets the description of the catalog entry.

## setProp() [1/2]

template<typename T >

void RDKit::FilterCatalogEntry::setProp | ( | const char * | key,
|  | T | val
| ) |  |

inline

sets a `property` value

Parameters

  key | the name under which the `property` should be stored. If a `property` is already stored under this name, it will be replaced.
  val | the value to be stored

Definition at line 112 of file FilterCatalogEntry.h.

## setProp() [2/2]

template<typename T >

void RDKit::FilterCatalogEntry::setProp | ( | const std::string & | key,
|  | T | val
| ) |  |

inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 118 of file FilterCatalogEntry.h.

References RDKit::Dict::setVal().

## setProps()

void RDKit::FilterCatalogEntry::setProps | ( | const Dict & | props | ) |

inline

Definition at line 192 of file FilterCatalogEntry.h.

## toStream()

virtual void RDKit::FilterCatalogEntry::toStream | ( | std::ostream & | ss | ) | const

virtual

serializes (pickles) to a stream

Implements RDCatalog::CatalogEntry.

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

- FilterCatalogEntry.h