OmniSciDB  d2f719934e
 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 2019 OmniSci, 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 kInjectRowId for non-insitu renders
26  // automatically inject rowid for projection queries.
27  // For example, this should be true when hit-testing is enabled.
28  kInjectRowId = 1u << 1,
29  // physical tables are required in the results
30  // For example, this should be true when hit-testing is enabled.
32  };
33 
34  bool shouldAlterRA() const { return flags_ & FlagBits::kInjectRowId; }
35 
36  bool useLegacyHitTestLogic() const { return flags_ & FlagBits::kLegacyHitTestLogic; }
37  bool injectRowId() const { return flags_ & FlagBits::kInjectRowId; }
38  bool requiresPhysicalTables() const {
39  return flags_ & FlagBits::kRequiresPhysicalTables;
40  }
41 
42  void setFlags(FlagBits flags_to_set) { flags_ |= flags_to_set; }
43  void clearFlags(FlagBits flags_to_clear) { flags_ &= (~flags_to_clear); }
44  void clearAllFlags() { flags_ = 0u; }
45 
46  bool operator==(const RenderQueryOptions& other) const {
47  return flags_ == other.flags_;
48  }
49  bool operator!=(const RenderQueryOptions& other) const { return !operator==(other); }
50 
51  private:
52  uint32_t flags_ = 0u;
53 };
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 injectRowId() const