10 #ifndef _STRUS_ANALYZER_QUERY_TERM_EXPRESSION_HPP_INCLUDED
11 #define _STRUS_ANALYZER_QUERY_TERM_EXPRESSION_HPP_INCLUDED
28 #if __cplusplus >= 201103L
36 ,m_instructions(o.m_instructions){}
46 static const char* ar[] = {
"term",
"op"};
51 :m_opCode(opCode_),m_idx(idx_),m_nofOperands(nofOperands_){}
53 :m_opCode(o.m_opCode),m_idx(o.m_idx),m_nofOperands(o.m_nofOperands){}
58 int idx()
const {
return m_idx;}
71 const std::vector<Instruction>&
instructions()
const {
return m_instructions;}
85 m_terms.push_back( term_);
97 std::vector<analyzer::QueryTerm> m_terms;
98 std::vector<Instruction> m_instructions;
Query instruction.
Definition: queryTermExpression.hpp:40
void pushTerm(const analyzer::QueryTerm &term_)
Add a search index term to the query.
Definition: queryTermExpression.hpp:82
int nofOperands() const
Number of operands.
Definition: queryTermExpression.hpp:60
OpCode
Definition: queryTermExpression.hpp:43
OpCode opCode() const
Opcode identifier.
Definition: queryTermExpression.hpp:56
Definition: queryTermExpression.hpp:43
void pushOperator(int operatorId, int nofOperands)
Add an instruction.
Definition: queryTermExpression.hpp:91
Definition: queryTermExpression.hpp:43
Instruction(const Instruction &o)
Definition: queryTermExpression.hpp:52
Instruction(OpCode opCode_, int idx_, std::size_t nofOperands_=0)
Definition: queryTermExpression.hpp:50
const std::vector< Instruction > & instructions() const
Get the list of query instructions.
Definition: queryTermExpression.hpp:71
const analyzer::QueryTerm & term(int idx) const
Get the argument of a term instruction.
Definition: queryTermExpression.hpp:75
Structure describing a typed query term.
QueryTermExpression()
Default constructor.
Definition: queryTermExpression.hpp:26
int idx() const
Index of the element in the associated list to retrieve with term(std::size_t) or the operator group ...
Definition: queryTermExpression.hpp:58
QueryTermExpression(const QueryTermExpression &o)
Copy constructor.
Definition: queryTermExpression.hpp:34
Structure describing a typed query term.
Definition: queryTerm.hpp:21
static const char * opCodeName(OpCode i)
Definition: queryTermExpression.hpp:44
Expression of a query terms as result of a query analysis.
Definition: queryTermExpression.hpp:22