# Xapian::Query::Internal Class Reference

Internal class, implementing most of Xapian::Query. More...

`#include <query.h>`

Inheritance diagram for Xapian::Query::Internal:

[legend]
Collaboration diagram for Xapian::Query::Internal:

[legend]
List of all members.

## Public Types

typedef std::vector< Internal * > | subquery_list
| The container type for storing pointers to subqueries.
typedef int | op_t
| Type storing the operation.

## Public Member Functions

| Internal (const Query::Internal &copyme)
| Copy constructor.
void | operator= (const Query::Internal &copyme)
| Assignment.
| Internal (const std::string &tname_, Xapian::termcount wqf_=1, Xapian::termpos term_pos_=0)
| A query consisting of a single term.
| Internal (op_t op_, Xapian::termcount parameter)
| Create internals given only the operator and a parameter.
| ~Internal ()
| Destructor.
void | add_subquery (const Query::Internal &subq)
| Add a subquery.
Query::Internal * | end_construction ()
| Finish off the construction.
std::string | serialise () const
| Return a string in an easily parsed form which contains all the information in a query.
std::string | get_description () const
| Returns a string representing the query.
Xapian::termcount | get_length () const
| Get the length of the query, used by some ranking formulae.
TermIterator | get_terms () const
| Return an iterator over all the terms in the query, in order of termpos.

## Static Public Member Functions

Xapian::Query::Internal * | unserialise (const std::string &s)

## Static Public Attributes

const int | OP_LEAF = -1

## Detailed Description

Internal class, implementing most of Xapian::Query.

## Member Typedef Documentation

typedef int Xapian::Query::Internal::op_t

| Type storing the operation.

typedef std::vector<Internal *> Xapian::Query::Internal::subquery_list

| The container type for storing pointers to subqueries.

## Constructor & Destructor Documentation

Xapian::Query::Internal::Internal | ( | const Query::Internal & | copyme | ) |

| Copy constructor.

Xapian::Query::Internal::Internal | ( | const std::string & | tname_,
|  | Xapian::termcount | wqf_ = `1`,
|  | Xapian::termpos | term_pos_ = `0`
| ) |

| A query consisting of a single term.

Xapian::Query::Internal::Internal | ( | op_t | op_,
|  | Xapian::termcount | parameter
| ) |

| Create internals given only the operator and a parameter.

Xapian::Query::Internal::~Internal | ( |  | ) |

| Destructor.

## Member Function Documentation

void Xapian::Query::Internal::add_subquery | ( | const Query::Internal & | subq | ) |

| Add a subquery.

Query::Internal* Xapian::Query::Internal::end_construction | ( |  | ) |

| Finish off the construction.

std::string Xapian::Query::Internal::get_description | ( |  | ) | const

| Returns a string representing the query. Introspection method.

Xapian::termcount Xapian::Query::Internal::get_length | ( |  | ) | const

| Get the length of the query, used by some ranking formulae. This value is calculated automatically - if you want to override it you can pass a different value to Enquire::set_query().

TermIterator Xapian::Query::Internal::get_terms | ( |  | ) | const

| Return an iterator over all the terms in the query, in order of termpos. If multiple terms have the same term position, their order is unspecified. Duplicates (same term and termpos) will be removed.

void Xapian::Query::Internal::operator= | ( | const Query::Internal & | copyme | ) |

| Assignment.

std::string Xapian::Query::Internal::serialise | ( |  | ) | const

| Return a string in an easily parsed form which contains all the information in a query.

The documentation for this class was generated from the following file:

- include/xapian/query.h