OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RenderQueryOptions.h
Go to the documentation of this file.
1 /*
2  * Copyright 2022 HEAVY.AI, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
20  public:
21  enum FlagBits {
22  // enableHitTesting field not available in Vega
23  // attempt to support it automatically
24  // requires physical tables and will enable kInjectRowIdForHitTesting for non-insitu
25  // renders
27  // automatically inject rowid for projection queries.
28  // For example, this should be true when hit-testing is enabled.
30  // physical tables are required in the results
31  // For example, this should be true when hit-testing is enabled.
33  // automatically inject rowid for ppll poly rendering.
35  };
36 
37  bool shouldAlterRA() const {
38  return flags_ & (FlagBits::kInjectRowIdForHitTesting | FlagBits::kInjectRowIdForPPLL);
39  }
40 
41  bool useLegacyHitTestLogic() const { return flags_ & FlagBits::kLegacyHitTestLogic; }
42  bool injectRowIdForHitTesting() const {
43  return flags_ & FlagBits::kInjectRowIdForHitTesting;
44  }
45  bool isHitTestingEnabled() const {
47  }
48  bool injectRowIdForPPLL() const { return flags_ & FlagBits::kInjectRowIdForPPLL; }
49  bool requiresPhysicalTables() const {
50  return flags_ & FlagBits::kRequiresPhysicalTables;
51  }
52 
53  void setFlags(FlagBits flags_to_set) { flags_ |= flags_to_set; }
54  void clearFlags(FlagBits flags_to_clear) { flags_ &= (~flags_to_clear); }
55  void clearAllFlags() { flags_ = 0u; }
56 
57  bool operator==(const RenderQueryOptions& other) const {
58  return flags_ == other.flags_;
59  }
60  bool operator!=(const RenderQueryOptions& other) const { return !operator==(other); }
61 
62  private:
63  uint32_t flags_ = 0u;
64 };
void clearFlags(FlagBits flags_to_clear)
bool shouldAlterRA() const
bool operator==(const RenderQueryOptions &other) const
bool requiresPhysicalTables() const
void setFlags(FlagBits flags_to_set)
bool useLegacyHitTestLogic() const
bool operator!=(const RenderQueryOptions &other) const
bool injectRowIdForHitTesting() const
bool injectRowIdForPPLL() const
bool isHitTestingEnabled() const