ansys::Project::Query Class Reference
Last update: 16.07.2025Set of conditions used in search within the Project. See Iterator::find() More...
#include "Query.hpp"
Public Member Functions | |
| Query (std::string pKey, Operator pOp) | |
| Constructor, simple query with unary operator. | |
| Query (std::string pKey, Operator pOp, std::string pVal) | |
| Constructor, simple query with binary operator. | |
| Query & | operator+= (const Query &pObj) |
| Append a Query object to the current. | |
| bool | evaluate (const Iterator &pIter) |
| Evaluates the query for the specified iterator. More... | |
| bool | evaluate (const Metadata &pMeta) |
| Evaluates the query for the specified metadata object Only variable names prefixed by Metadata:: will be evaluated. More... | |
Detailed Description
Set of conditions used in search within the Project. See Iterator::find()
Query variables:
- name : The project item name
- type : The project item type (File, Folder, Link, ...)
- subclass : The item subclass
- Metadata::* : The metadata key named *
Query operators:
- OpEqual , OpNotEqual : Equality operator
- OpContains : Check if the string contains the specified value
- OpListContains : Check if the data is a CSV vector and contains the value
- OpHasKey : Check if the key is known (Metadata::*)
A query will succeed if all key-operator-[value] tuples are true.
Member Function Documentation
◆ evaluate() [1/2]
| bool ansys::Project::Query::evaluate | ( | const Iterator & | pIter | ) |
Evaluates the query for the specified iterator.
- Returns
- true if the Query matches the iterator content.