strus  0.17
Public Types | Public Member Functions | Static Public Member Functions | List of all members
strus::MetaDataRestrictionInterface Class Referenceabstract

Class for building up a metadata restriction. More...

#include <metaDataRestrictionInterface.hpp>

Public Types

enum  CompareOperator {
  CompareLess, CompareLessEqual, CompareEqual, CompareNotEqual,
  CompareGreater, CompareGreaterEqual
}
 Comparison operator for restrictions. More...
 
enum  { NofCompareOperators =((int)CompareGreaterEqual+1) }
 Number of comparison operators. More...
 

Public Member Functions

virtual ~MetaDataRestrictionInterface ()
 Destructor. More...
 
virtual void addCondition (const CompareOperator &opr, const std::string &name, const NumericVariant &operand, bool newGroup=true)=0
 Add a condition on the metadata to this metadata restriction. More...
 
virtual
MetaDataRestrictionInstanceInterface
createInstance () const =0
 Create an instance of this metadata restriction. More...
 
virtual std::string tostring () const =0
 Return a readable string representation of the expression. More...
 

Static Public Member Functions

static const char * compareOperatorStr (CompareOperator op)
 Get the operator as string. More...
 
static const char * compareOperatorName (CompareOperator op)
 Get the operator name as string. More...
 

Detailed Description

Class for building up a metadata restriction.

Member Enumeration Documentation

anonymous enum

Number of comparison operators.

Enumerator
NofCompareOperators 

Comparison operator for restrictions.

Enumerator
CompareLess 

operator '<' respecting machine epsilon

CompareLessEqual 

operator '<=' respecting machine epsilon

CompareEqual 

operator '==' respecting machine epsilon

CompareNotEqual 

operator '!=' respecting machine epsilon

CompareGreater 

operator '>' respecting machine epsilon

CompareGreaterEqual 

operator '>=' respecting machine epsilon

Constructor & Destructor Documentation

virtual strus::MetaDataRestrictionInterface::~MetaDataRestrictionInterface ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual void strus::MetaDataRestrictionInterface::addCondition ( const CompareOperator opr,
const std::string &  name,
const NumericVariant &  operand,
bool  newGroup = true 
)
pure virtual

Add a condition on the metadata to this metadata restriction.

Parameters
[in]oprcondition compare operator
[in]namename of meta data element to check
[in]operandconstant number to check against
[in]newGrouptrue, if the conditional opens a new group of elements joined with a logical "OR" false, if the conditional belongs to the last group of elements joined with a logical "OR". Different groups are joined with a logical "AND" to form the meta data restriction expression (See CNF = conjunctive normalform)
static const char* strus::MetaDataRestrictionInterface::compareOperatorName ( CompareOperator  op)
inlinestatic

Get the operator name as string.

static const char* strus::MetaDataRestrictionInterface::compareOperatorStr ( CompareOperator  op)
inlinestatic

Get the operator as string.

virtual MetaDataRestrictionInstanceInterface* strus::MetaDataRestrictionInterface::createInstance ( ) const
pure virtual

Create an instance of this metadata restriction.

Returns
the created restriction instance
virtual std::string strus::MetaDataRestrictionInterface::tostring ( ) const
pure virtual

Return a readable string representation of the expression.

Returns
the expression as string

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