ScaleOut C++ Native Client API  5.1
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Pages
sosscli::QueryExpression Class Referenceabstract

The QueryExpression class serves as an abstract base class for the abstract syntax tree nodes used in Filter expressions. More...

#include <query_expression.h>

Classes

class  Visitor
 The QueryExpression visitor base class. More...
 

Public Types

enum  OpCode {
  Compare = 1, Not, And, Or,
  Equals, HasAnyTag, HasAllTags, HasTags,
  StringContains
}
 The boolean expression OpCodes supported by StateServer's query expression (filter) evaluator. More...
 

Public Member Functions

virtual ~QueryExpression ()
 Destructor.
 
virtual void accept (Visitor &v) const =0
 Abstract member method. More...
 

Detailed Description

The QueryExpression class serves as an abstract base class for the abstract syntax tree nodes used in Filter expressions.

In particular, it hosts the QueryExpression::Visitor class which is used to implement a visitor pattern for walking the tree.

Member Enumeration Documentation

The boolean expression OpCodes supported by StateServer's query expression (filter) evaluator.

Enumerator
Compare 

Compare a property spec value with a query spec value.

The server expects that the Type of the query spec value is exactly the same as the property spec value. Any widening or narrowing type conversions required to convert the query spec value to match the type of the property spec value should be done on the client when constructing the query spec.

Not 

Negate the boolean expression following the Not OpCode.

And 

Perform the logical AND of the two boolean expressions that follow.

Or 

Perform the logical OR of the two boolean expressions that follow.

Equals 

Compare the result values of two boolean expressions for equality.

HasAnyTag 

Return true if any query spec tag bits are in the property spec tag bits.

HasAllTags 

Return true if all query spec tag bits are in property spec tag bits.

HasTags 

Return true if the tag bits specified by a mask are identically set/not set in the property tags and query tags.

StringContains 

Returns true if the first (string) operand contains the second (string) operand.

Member Function Documentation

virtual void sosscli::QueryExpression::accept ( Visitor v) const
pure virtual

Abstract member method.

QueryExpression subclasses each implement this method as

void accept(Visitor &v)
{
v.visit(*this);
}

Thus, the appropriate overload of QueryExpression::Vistor::visit is called, passing the QueryExpression node to the visitor.

Parameters
vThe QueryExpression::Visitor visitor instance.

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