summaryrefslogtreecommitdiffstats
path: root/include/framework/interface/Query.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/framework/interface/Query.h')
-rw-r--r--include/framework/interface/Query.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/framework/interface/Query.h b/include/framework/interface/Query.h
new file mode 100644
index 0000000..3d487f0
--- /dev/null
+++ b/include/framework/interface/Query.h
@@ -0,0 +1,30 @@
+/*
+ * include/framework/interface/Query.h
+ *
+ * Copyright (C) 2023 Douglas B. Rumbaugh <drumbaugh@psu.edu>
+ *
+ * Distributed under the Modified BSD License.
+ *
+ */
+#pragma once
+
+#include "framework/QueryRequirements.h"
+
+namespace de{
+
+template <typename Q, typename R, typename S>
+concept QueryInterface = requires(void *p, S *sh, std::vector<void*> &s, std::vector<std::vector<Wrapped<R>>> &rv, BufferView<R> *bv) {
+ {Q::get_query_state(sh, p)} -> std::convertible_to<void*>;
+ {Q::get_buffer_query_state(bv, p)} -> std::convertible_to<void *>;
+ {Q::process_query_states(p, s, p)};
+ {Q::query(sh, p, p)} -> std::convertible_to<std::vector<Wrapped<R>>>;
+ {Q::buffer_query(p, p)} -> std::convertible_to<std::vector<Wrapped<R>>>;
+ {Q::merge(rv, p)} -> std::convertible_to<std::vector<R>>;
+
+ {Q::delete_query_state(p)} -> std::same_as<void>;
+ {Q::delete_buffer_query_state(p)} -> std::same_as<void>;
+
+ {Q::EARLY_ABORT} -> std::convertible_to<bool>;
+ {Q::SKIP_DELETE_FILTER} -> std::convertible_to<bool>;
+};
+}