| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // SPDX-FileCopyrightText: 2023 Carl Zeiss Microscopy GmbH | ||
| 2 | // | ||
| 3 | // SPDX-License-Identifier: MIT | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include <functional> | ||
| 8 | #include <vector> | ||
| 9 | #include <cstdint> | ||
| 10 | |||
| 11 | namespace imgdoc2 | ||
| 12 | { | ||
| 13 | /// Values that represent "logical operator" which combines two comparison operations. | ||
| 14 | enum class LogicalOperator : std::uint8_t | ||
| 15 | { | ||
| 16 | Invalid = 0, ///< An enum constant representing the invalid option. This is only legal for the condition with index 0. | ||
| 17 | And, ///< An enum constant representing the AND option, i.e. this condition is combined with a logical AND with the previous condition. | ||
| 18 | Or, ///< An enum constant representing the OR option, i.e. this condition is combined with a logical OR with the previous condition. | ||
| 19 | |||
| 20 | MaxValue = Or ///< This must be equal to the largest numerical value in the enumeration. | ||
| 21 | }; | ||
| 22 | |||
| 23 | /// Values that represent the comparison operation. | ||
| 24 | enum class ComparisonOperation : std::uint8_t | ||
| 25 | { | ||
| 26 | Invalid = 0, ///< An enum constant representing the invalid option. | ||
| 27 | Equal, ///< An enum constant representing the "is equal to" comparison operation. | ||
| 28 | NotEqual, ///< An enum constant representing the "is not equal to" comparison operation. | ||
| 29 | LessThan, ///< An enum constant representing the "is less than" comparison operation. | ||
| 30 | LessThanOrEqual, ///< An enum constant representing the "is less than or equal" comparison operation. | ||
| 31 | GreaterThan, ///< An enum constant representing the "is greater than" comparison operation. | ||
| 32 | GreaterThanOrEqual, ///< An enum constant representing the "is greater than or equal" comparison operation. | ||
| 33 | |||
| 34 | MaxValue = GreaterThanOrEqual ///< This must be equal to the largest numerical value in the enumeration. | ||
| 35 | }; | ||
| 36 | |||
| 37 | /// Interface defining the query-clause on "tile-info". | ||
| 38 | class ITileInfoQueryClause | ||
| 39 | { | ||
| 40 | public: | ||
| 41 | /// Gets a condition for the pyramid-level property. The conditions on this property are to be numbered 0 to n-1, where | ||
| 42 | /// n is the number of conditions. If calling this method with an argument "no" larger than n-1, the method must return | ||
| 43 | /// false. This method is required to be idempotent, if called multiple times (with same arguments) it must give the | ||
| 44 | /// same result. | ||
| 45 | /// Note that the logical operator of the condition with index 0 is unused. | ||
| 46 | /// \param no The 0-based index of the condition being queried. | ||
| 47 | /// \param [out] logical_operator If non-null and the operation is successful, the logical operator is placed here. | ||
| 48 | /// \param [out] comparison_operation If non-null and the operation is successful, the comparison operation is placed here. | ||
| 49 | /// \param [out] value If non-null and the operation is successful, the value for the comparison operation is placed here. | ||
| 50 | /// \returns True if it succeeds, false if it fails. | ||
| 51 | virtual bool GetPyramidLevelCondition(int no, LogicalOperator* logical_operator, ComparisonOperation* comparison_operation, int* value) const = 0; | ||
| 52 | |||
| 53 | 32 | virtual ~ITileInfoQueryClause() = default; | |
| 54 | }; | ||
| 55 | } | ||
| 56 |