docudb  1.0
Loading...
Searching...
No Matches
docudb::query::logic_gate< A, B > Struct Template Reference

Represents a logic gate for combining two queryable objects. More...

#include <docudb.hpp>

Inheritance diagram for docudb::query::logic_gate< A, B >:
docudb::query::logic_and< A, B > docudb::query::logic_or< A, B >

Public Member Functions

 logic_gate (A &&a, B &&b, std::string const &gate)
 
std::string to_query_string () const
 
binder const & get_binder () const
 
binderget_binder ()
 

Detailed Description

template<Queryable A, Queryable B>
struct docudb::query::logic_gate< A, B >

Represents a logic gate for combining two queryable objects.

Definition at line 182 of file docudb.hpp.

Constructor & Destructor Documentation

◆ logic_gate()

template<Queryable A, Queryable B>
docudb::query::logic_gate< A, B >::logic_gate ( A && a,
B && b,
std::string const & gate )
inlineexplicit

Definition at line 185 of file docudb.hpp.

185 : a_(std::move(a)), b_(std::move(b)), gate_(gate)
186 {
187 binder_.merge(a_.get_binder());
188 binder_.merge(b_.get_binder());
189 }
void merge(binder &b)
Definition docudb.hpp:155

Member Function Documentation

◆ get_binder() [1/2]

template<Queryable A, Queryable B>
binder & docudb::query::logic_gate< A, B >::get_binder ( )
inline

Definition at line 201 of file docudb.hpp.

202 {
203 return binder_;
204 }

◆ get_binder() [2/2]

template<Queryable A, Queryable B>
binder const & docudb::query::logic_gate< A, B >::get_binder ( ) const
inline

Definition at line 196 of file docudb.hpp.

197 {
198 return binder_;
199 }

◆ to_query_string()

template<Queryable A, Queryable B>
std::string docudb::query::logic_gate< A, B >::to_query_string ( ) const
inline

Definition at line 191 of file docudb.hpp.

192 {
193 return std::format("{} {} {}", a_.to_query_string(), gate_, b_.to_query_string());
194 }

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