C++ Based OPC UA Client/Server SDK
1.6.1.391
|
OPC UA ContentFilterElement used in ContentFilter. More...
#include <uacontentfilter.h>
Public Member Functions | |
UaContentFilterElement () | |
Constructs an empty content filter element object. | |
UaContentFilterElement (const UaContentFilterElement &other) | |
Constructs a content filter element object from another content filter element object. | |
UaContentFilterElement (const OpcUa_ContentFilterElement &other) | |
Constructs a content filter element object from a content filter element structure. | |
virtual | ~UaContentFilterElement () |
Destroys the content filter element object. | |
UaContentFilterElement & | operator= (const UaContentFilterElement &other) |
Assigns another content filter element object to this content filter element object and returns a reference to this object. | |
void | setElementIndex (OpcUa_Int32 elementIndex) |
Sets the index of the filter element in the content filter element array. More... | |
OpcUa_Int32 | elementIndex () const |
Returns the index of the filter element in the content filter element array. | |
void | setFilterOperator (OpcUa_FilterOperator filterOperator) |
Sets the filter operator for the filter element. More... | |
OpcUa_FilterOperator | filterOperator () const |
Returns the filter operator of the filter element. More... | |
void | setFilterOperand (OpcUa_UInt32 index, UaFilterOperand *pOperand, OpcUa_UInt32 arraySize) |
Sets one operand of the filter operand list. More... | |
OpcUa_UInt32 | getFilterOperandArraySize () const |
Returns the array size of the filter operand list. | |
const UaFilterOperand * | getFilterOperand (OpcUa_UInt32 index) const |
Returns the entry from the filter operand list on the requested index. More... | |
UaString | toString () const |
Returns the content filter element as string. | |
OPC UA ContentFilterElement used in ContentFilter.
This class is used to build and hold an OPC UA ContentFilterElement used in the UaContentFilter. The content filter elements and the element filter operands (UaElementOperand derived from UaFilterOperand) can be used to build a filter hierarchy.
OpcUa_FilterOperator UaContentFilterElement::filterOperator | ( | ) | const |
Returns the filter operator of the filter element.
const UaFilterOperand * UaContentFilterElement::getFilterOperand | ( | OpcUa_UInt32 | index | ) | const |
Returns the entry from the filter operand list on the requested index.
[in] | index | Index of the operand in the array |
void UaContentFilterElement::setElementIndex | ( | OpcUa_Int32 | elementIndex | ) |
Sets the index of the filter element in the content filter element array.
[in] | elementIndex | The index of the current element. |
void UaContentFilterElement::setFilterOperand | ( | OpcUa_UInt32 | index, |
UaFilterOperand * | pOperand, | ||
OpcUa_UInt32 | arraySize | ||
) |
Sets one operand of the filter operand list.
The class takes the ownership of the passed object pOperand. There are three different filter operands defined:
[in] | index | Index of the operand in the array |
[in] | pOperand | UaFilterOperand to set at the index in the array |
[in] | arraySize | Size of the operand array filled with this method |
void UaContentFilterElement::setFilterOperator | ( | OpcUa_FilterOperator | filterOperator | ) |
Sets the filter operator for the filter element.
Possible filter operators are:
Special Character | Description |
---|---|
% | Match any string of zero or more characters (i.e. 'main%' would match any string that starts with 'main', '%en%' would match any string that contains the letters 'en' such as 'entail', 'green' and 'content'.) If a string includes the '%' sign, the list operand can be used (i.e. 5[%] would match '5%'). |
_ | Match any single character (i.e. '_ould' would match 'would', 'could'). If a string includes a '_', then the list operand can be used (i.e. 5[_] would match '5_'). |
\ | Escape character allows literal interpretation (i.e. \\ is \, \% is %, \_ is _) |
[] | Match any single character in a list (i.e. 'abc[13-68]' would match 'abc1','abc3','abc4','abc5','abc6', and 'abc8'. 'xyz[c-f]' would match 'xyzc', 'xyzd', 'xyze', 'xyzf'). |
[^] | Not Matching any single character in a list. The ^ shall be the first character inside on the []. (i.e. 'ABC[^13-5]' would NOT match 'ABC1', 'ABC3', 'ABC4', and 'ABC5'. xyz[^dgh] would NOT match 'xyzd', 'xyzg', 'xyzh'. ) |