knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
knowrob::Query Class Reference

#include <Query.h>

Inheritance diagram for knowrob::Query:
Collaboration diagram for knowrob::Query:

Public Member Functions

 Query (QueryContextPtr ctx=DefaultQueryContext())
 
virtual ~Query ()=default
 
auto & ctx () const
 
void setContext (QueryContextPtr ctx)
 
 Query (QueryContextPtr ctx=DefaultQueryContext())
 
virtual ~Query ()=default
 
auto & ctx () const
 
void setContext (QueryContextPtr ctx)
 
- Public Member Functions inherited from knowrob::Printable
virtual ~Printable ()=default
 
virtual void write (std::ostream &os) const =0
 
virtual std::string format () const
 
virtual ~Printable ()=default
 
virtual void write (std::ostream &os) const =0
 
virtual std::string format () const
 

Protected Attributes

QueryContextPtr ctx_
 

Detailed Description

A baseclass for queries. The only commitment is that queries are evaluated within a certain context. The context defines additional parameters for the evaluation.

Definition at line 29 of file Query.h.

Constructor & Destructor Documentation

◆ Query() [1/2]

knowrob::Query::Query ( QueryContextPtr  ctx = DefaultQueryContext())
inlineexplicit
Parameters
ctxthe query context.

Definition at line 34 of file Query.h.

34 : ctx_(std::move(ctx)) {}
auto & ctx() const
Definition: Query.h:41
QueryContextPtr ctx_
Definition: Query.h:49

◆ ~Query() [1/2]

virtual knowrob::Query::~Query ( )
virtualdefault

◆ Query() [2/2]

knowrob::Query::Query ( QueryContextPtr  ctx = DefaultQueryContext())
inlineexplicit
Parameters
ctxthe query context.

Definition at line 34 of file Query.h.

34 : ctx_(std::move(ctx)) {}

◆ ~Query() [2/2]

virtual knowrob::Query::~Query ( )
virtualdefault

Member Function Documentation

◆ ctx() [1/2]

auto& knowrob::Query::ctx ( ) const
inline
Returns
the query context.

Definition at line 41 of file Query.h.

41 { return ctx_; }

◆ ctx() [2/2]

auto& knowrob::Query::ctx ( ) const
inline
Returns
the query context.

Definition at line 41 of file Query.h.

41 { return ctx_; }

◆ setContext() [1/2]

void knowrob::Query::setContext ( QueryContextPtr  ctx)
inline
Parameters
ctxthe query context.

Definition at line 46 of file Query.h.

46 { ctx_ = std::move(ctx); }

◆ setContext() [2/2]

void knowrob::Query::setContext ( QueryContextPtr  ctx)
inline
Parameters
ctxthe query context.

Definition at line 46 of file Query.h.

46 { ctx_ = std::move(ctx); }

Member Data Documentation

◆ ctx_

QueryContextPtr knowrob::Query::ctx_
protected

Definition at line 49 of file Query.h.


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