29 #ifndef CDPL_CHEM_MULTISUBSTRUCTURESEARCH_HPP
30 #define CDPL_CHEM_MULTISUBSTRUCTURESEARCH_HPP
81 void setup(
const std::string& qry_expr =
"");
83 std::string
validate(
const std::string& qry_expr, std::size_t max_substr_id);
89 typedef std::unique_ptr<ExprTreeNode> ExprTreeNodePtr;
90 typedef std::vector<MolecularGraph::SharedPointer> MolGraphPtrArray;
92 Token nextToken(
const std::string& expr);
94 ExprTreeNodePtr parseExpression(
const std::string& expr);
95 ExprTreeNodePtr parseTerm(
const std::string& expr);
96 ExprTreeNodePtr parseFactor(
const std::string& expr);
98 void validateExpression(
const std::string& expr, std::size_t max_substr_id);
99 void validateTerm(
const std::string& expr, std::size_t max_substr_id);
100 void validateFactor(
const std::string& expr, std::size_t max_substr_id);
102 MolGraphPtrArray substructures;
103 std::size_t nextTokenStart;
105 std::size_t substrID;
106 ExprTreeNodePtr exprTree;
Definition of the preprocessor macro CDPL_CHEM_API.
#define CDPL_CHEM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of the class CDPL::Chem::MolecularGraph.
MolecularGraph.
Definition: MolecularGraph.hpp:52
std::shared_ptr< MolecularGraph > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MolecularGraph instances.
Definition: MolecularGraph.hpp:58
MultiSubstructureSearch.
Definition: MultiSubstructureSearch.hpp:52
std::size_t getNumSubstructures() const
void addSubstructure(const MolecularGraph::SharedPointer &molgraph)
~MultiSubstructureSearch()
Destructor.
MultiSubstructureSearch(const MultiSubstructureSearch &)=delete
MultiSubstructureSearch()
Constructs and initializes a MultiSubstructureSearch instance.
void setup(const std::string &qry_expr="")
std::shared_ptr< MultiSubstructureSearch > SharedPointer
Definition: MultiSubstructureSearch.hpp:55
bool matches(const MolecularGraph &molgraph)
std::string validate(const std::string &qry_expr, std::size_t max_substr_id)
MultiSubstructureSearch & operator=(const MultiSubstructureSearch &)=delete
The namespace of the Chemical Data Processing Library.