4 #ifndef _RD_MOLCATALOGENTRY_H_ 5 #define _RD_MOLCATALOGENTRY_H_ 21 dp_props =
new Dict();
45 unsigned int getOrder()
const {
return d_order; };
46 void setOrder(
unsigned int order) { d_order=order; };
57 template <
typename T>
void setProp(
const char *key, T &val)
const {
58 dp_props->
setVal(key, val);
62 template <
typename T>
void setProp(
const std::string &key, T &val)
const {
68 void getProp(
const char *key, T &res)
const {
69 dp_props->
getVal(key, res);
73 void getProp(
const std::string &key, T &res)
const {
79 if (!dp_props)
return false;
80 return dp_props->
hasVal(key);
83 bool hasProp(
const std::string &key)
const {
97 void toStream(std::ostream &ss)
const;
109 unsigned int d_order;
110 std::string d_descrip;
unsigned int getOrder() const
This class is used to store ROMol objects in a MolCatalog.
void setVal(const std::string &what, T &val)
Sets the value associated with a key.
bool hasProp(const std::string &key) const
bool hasProp(const char *key) const
returns true if such a property exists
void getProp(const std::string &key, T &res) const
void initFromString(const std::string &text)
initialize from a string containing a pickle
ROMol is a molecule class that is intended to have a fixed topology.
void clearVal(const std::string &what)
Clears the value associated with a particular key, removing the key from the dictionary.
void getVal(const std::string &what, T &res) const
Gets the value associated with a particular key.
void setOrder(unsigned int order)
void setBitId(int bid)
sets our bit Id
const ROMol * getMol() const
std::string getDescription() const
returns a text description of this entry
void setProp(const char *key, T &val) const
set a named property
Includes a bunch of functionality for handling Atom and Bond queries.
void clearProp(const char *key) const
clears a named property
void setMol(const ROMol *molPtr)
hold the provided ROMol
bool hasVal(const char *what) const
Returns whether or not the dictionary contains a particular key.
Abstract base class to be used to represent an entry in a Catalog.
void setProp(const std::string &key, T &val) const
MolCatalogEntry(const std::string &pickle)
construct from a pickle
void initFromStream(std::istream &ss)
initialize from a stream containing a pickle
std::string Serialize() const
returns a serialized (pickled) form of the entry
void toStream(std::ostream &ss) const
serializes this entry to the stream
The Dict class can be used to store objects of arbitrary type keyed by strings.
void setDescription(std::string val)
void clearProp(const std::string &key) const
void getProp(const char *key, T &res) const
get the value of a named property