5 #ifndef _RD_MOLCATALOGENTRY_H_
6 #define _RD_MOLCATALOGENTRY_H_
20 dp_props =
new Dict();
42 unsigned int getOrder()
const {
return d_order; };
43 void setOrder(
unsigned int order) { d_order = order; };
55 void setProp(
const char *key, T &val)
const {
56 dp_props->setVal(key, val);
61 void setProp(
const std::string &key, T &val)
const {
62 setProp(key.c_str(), val);
67 void getProp(
const char *key, T &res)
const {
68 dp_props->getVal(key, res);
72 void getProp(
const std::string &key, T &res)
const {
73 getProp(key.c_str(), res);
78 if (!dp_props)
return false;
79 return dp_props->hasVal(key);
85 void clearProp(
const char *key)
const { dp_props->clearVal(key); }
99 const ROMol *dp_mol{
nullptr};
102 unsigned int d_order{0};
103 std::string d_descrip;
Abstract base class to be used to represent an entry in a Catalog.
The Dict class can be used to store objects of arbitrary type keyed by strings.
This class is used to store ROMol objects in a MolCatalog.
unsigned int getOrder() const
void clearProp(const std::string &key) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void toStream(std::ostream &ss) const
serializes this entry to the stream
void setMol(const ROMol *molPtr)
hold the provided ROMol
void initFromStream(std::istream &ss)
initialize from a stream containing a pickle
MolCatalogEntry(const std::string &pickle)
construct from a pickle
void setOrder(unsigned int order)
void getProp(const char *key, T &res) const
get the value of a named property
std::string getDescription() const
returns a text description of this entry
void setProp(const char *key, T &val) const
set a named property
void setProp(const std::string &key, T &val) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
MolCatalogEntry(const MolCatalogEntry &other)
copy constructor
void clearProp(const char *key) const
clears a named property
std::string Serialize() const
returns a serialized (pickled) form of the entry
void setDescription(std::string val)
void initFromString(const std::string &text)
initialize from a string containing a pickle
const ROMol * getMol() const
void getProp(const std::string &key, T &res) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
MolCatalogEntry(const ROMol *omol)
create an entry to hold the provided ROMol
bool hasProp(const char *key) const
returns true if such a property exists
bool hasProp(const std::string &key) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
#define RDKIT_MOLCATALOG_EXPORT
RDKIT_CHEMREACTIONS_EXPORT void pickle(const boost::shared_ptr< EnumerationStrategyBase > &enumerator, std::ostream &ss)
pickles a EnumerationStrategy and adds the results to a stream ss