10 #ifndef _STRUS_ANALYZER_DOCUMENT_TERM_HPP_INCLUDED
11 #define _STRUS_ANALYZER_DOCUMENT_TERM_HPP_INCLUDED
28 :m_type(),m_value(),m_pos(0){}
30 #if __cplusplus >= 201103L
37 :m_type(o.m_type),m_value(o.m_value),m_pos(o.m_pos){}
45 :m_type(t),m_value(v),m_pos(p){}
49 const std::string&
type()
const {
return m_type;}
52 const std::string&
value()
const {
return m_value;}
65 return (m_type == o.m_type)
71 return m_pos < o.m_pos;
void setPos(const Position &pos_)
Set the ordinal position of the term.
Definition: documentTerm.hpp:59
int Position
Definition: documentTerm.hpp:24
bool operator<(const DocumentTerm &o) const
Definition: documentTerm.hpp:61
DocumentTerm(const DocumentTerm &o)
Copy constructor.
Definition: documentTerm.hpp:36
DocumentTerm()
Default constructor.
Definition: documentTerm.hpp:27
const std::string & type() const
Get the type name of the term.
Definition: documentTerm.hpp:49
Position pos() const
Get the ordinal position of the term.
Definition: documentTerm.hpp:55
void clear()
Definition: documentTerm.hpp:80
Structure describing a position in a document source by segment and offset.
Definition: position.hpp:22
const std::string & value() const
Get the value of the term.
Definition: documentTerm.hpp:52
bool defined() const
Definition: documentTerm.hpp:75
Structure describing a typed document term.
Definition: documentTerm.hpp:21