strus
0.17
|
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... | |
Class for building up a metadata restriction.
Comparison operator for restrictions.
|
inlinevirtual |
Destructor.
|
pure virtual |
Add a condition on the metadata to this metadata restriction.
[in] | opr | condition compare operator |
[in] | name | name of meta data element to check |
[in] | operand | constant number to check against |
[in] | newGroup | true, 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) |
|
inlinestatic |
Get the operator name as string.
|
inlinestatic |
Get the operator as string.
|
pure virtual |
Create an instance of this metadata restriction.
|
pure virtual |
Return a readable string representation of the expression.