| 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 <vector> | ||
| 8 | #include <set> | ||
| 9 | #include "ITileCoordinate.h" | ||
| 10 | #include "types.h" | ||
| 11 | |||
| 12 | namespace imgdoc2 | ||
| 13 | { | ||
| 14 | /// This interface describes a query clause for the dimension-columns. | ||
| 15 | /// It is important that this object is idempotent - meaning if the methods are | ||
| 16 | /// called multiple times, an implementation is required to give identical results. | ||
| 17 | class IDimCoordinateQueryClause | ||
| 18 | { | ||
| 19 | public: | ||
| 20 | /// A range clause means that the value must be greater than or equal to the | ||
| 21 | /// 'start' field and less than or equal than the 'end'. Use int-min for start | ||
| 22 | /// in order to have only a "less than or equal" comparison, and int-max for | ||
| 23 | /// "greater or equal". | ||
| 24 | struct RangeClause | ||
| 25 | { | ||
| 26 | int start; ///< The start value of the range (inclusive). | ||
| 27 | int end; ///< The end value of the range (inclusive). | ||
| 28 | }; | ||
| 29 | |||
| 30 | /// Gets the set of dimensions for which there is a clause present. It is important that the order | ||
| 31 | /// of elements is idempotent (as of course the content itself). | ||
| 32 | /// \returns The set of dimensions for which there are clauses. | ||
| 33 | [[nodiscard]] virtual const std::set<imgdoc2::Dimension>& GetTileDimsForClause() const = 0; | ||
| 34 | |||
| 35 | /// Gets range clauses for the specified dimension if they exist. Otherwise, null is returned. | ||
| 36 | /// \param d The dimension to query the range clauses for. | ||
| 37 | /// \returns Null if it fails, else the range clauses. | ||
| 38 | [[nodiscard]] virtual const std::vector<RangeClause>* GetRangeClause(imgdoc2::Dimension d) const = 0; | ||
| 39 | |||
| 40 | 92 | virtual ~IDimCoordinateQueryClause() = default; | |
| 41 | }; | ||
| 42 | } | ||
| 43 |