aboutsummaryrefslogtreecommitdiff
path: root/src/strategies
diff options
context:
space:
mode:
authorNicolas James <Eele1Ephe7uZahRie@tutanota.com>2026-04-05 18:30:25 +1000
committerNicolas James <Eele1Ephe7uZahRie@tutanota.com>2026-04-05 18:30:25 +1000
commit21e55ae8a1b3ddd4dff6c24a57bdc7d7272fff16 (patch)
tree1b13d5ea55c38d41becd64b003cdb0645159970a /src/strategies
parent411f7acb1f92db88d2a3c92bb40da2133852b40e (diff)
Add boilerplate for separate implementations
Diffstat (limited to 'src/strategies')
-rw-r--r--src/strategies/anti_lag/device_strategy.cc10
-rw-r--r--src/strategies/anti_lag/device_strategy.hh18
-rw-r--r--src/strategies/anti_lag/queue_strategy.cc10
-rw-r--r--src/strategies/anti_lag/queue_strategy.hh18
-rw-r--r--src/strategies/device_strategy.cc9
-rw-r--r--src/strategies/device_strategy.hh18
-rw-r--r--src/strategies/low_latency2/device_strategy.cc10
-rw-r--r--src/strategies/low_latency2/device_strategy.hh18
-rw-r--r--src/strategies/low_latency2/queue_strategy.cc10
-rw-r--r--src/strategies/low_latency2/queue_strategy.hh18
-rw-r--r--src/strategies/queue_strategy.cc11
-rw-r--r--src/strategies/queue_strategy.hh18
12 files changed, 168 insertions, 0 deletions
diff --git a/src/strategies/anti_lag/device_strategy.cc b/src/strategies/anti_lag/device_strategy.cc
new file mode 100644
index 0000000..5032c97
--- /dev/null
+++ b/src/strategies/anti_lag/device_strategy.cc
@@ -0,0 +1,10 @@
+#include "device_strategy.hh"
+
+namespace low_latency {
+
+AntiLagDeviceStrategy::AntiLagDeviceStrategy(DeviceContext& device)
+ : DeviceStrategy(device) {}
+
+AntiLagDeviceStrategy::~AntiLagDeviceStrategy() {}
+
+} // namespace low_latency \ No newline at end of file
diff --git a/src/strategies/anti_lag/device_strategy.hh b/src/strategies/anti_lag/device_strategy.hh
new file mode 100644
index 0000000..8a9afee
--- /dev/null
+++ b/src/strategies/anti_lag/device_strategy.hh
@@ -0,0 +1,18 @@
+#ifndef STRATEGIES_ANTI_LAG_DEVICE_STRATEGY_HH_
+#define STRATEGIES_ANTI_LAG_DEVICE_STRATEGY_HH_
+
+#include "strategies/device_strategy.hh"
+
+namespace low_latency {
+
+class DeviceContext;
+
+class AntiLagDeviceStrategy final : public DeviceStrategy {
+ public:
+ AntiLagDeviceStrategy(DeviceContext& device);
+ virtual ~AntiLagDeviceStrategy();
+};
+
+} // namespace low_latency
+
+#endif
diff --git a/src/strategies/anti_lag/queue_strategy.cc b/src/strategies/anti_lag/queue_strategy.cc
new file mode 100644
index 0000000..ba60535
--- /dev/null
+++ b/src/strategies/anti_lag/queue_strategy.cc
@@ -0,0 +1,10 @@
+#include "queue_strategy.hh"
+
+namespace low_latency {
+
+AntiLagQueueStrategy::AntiLagQueueStrategy(QueueContext& queue)
+ : QueueStrategy(queue) {}
+
+AntiLagQueueStrategy::~AntiLagQueueStrategy() {}
+
+} // namespace low_latency
diff --git a/src/strategies/anti_lag/queue_strategy.hh b/src/strategies/anti_lag/queue_strategy.hh
new file mode 100644
index 0000000..81ae653
--- /dev/null
+++ b/src/strategies/anti_lag/queue_strategy.hh
@@ -0,0 +1,18 @@
+#ifndef STRATEGIES_ANTI_LAG_QUEUE_STRATEGY_HH_
+#define STRATEGIES_ANTI_LAG_QUEUE_STRATEGY_HH_
+
+#include "strategies/queue_strategy.hh"
+
+namespace low_latency {
+
+class QueueContext;
+
+class AntiLagQueueStrategy final : public QueueStrategy {
+ public:
+ AntiLagQueueStrategy(QueueContext& queue);
+ virtual ~AntiLagQueueStrategy();
+};
+
+} // namespace low_latency
+
+#endif
diff --git a/src/strategies/device_strategy.cc b/src/strategies/device_strategy.cc
new file mode 100644
index 0000000..1afdc60
--- /dev/null
+++ b/src/strategies/device_strategy.cc
@@ -0,0 +1,9 @@
+#include "device_strategy.hh"
+
+namespace low_latency {
+
+DeviceStrategy::DeviceStrategy(DeviceContext& device) : device(device) {}
+
+DeviceStrategy::~DeviceStrategy() {}
+
+} // namespace low_latency \ No newline at end of file
diff --git a/src/strategies/device_strategy.hh b/src/strategies/device_strategy.hh
new file mode 100644
index 0000000..1b95e11
--- /dev/null
+++ b/src/strategies/device_strategy.hh
@@ -0,0 +1,18 @@
+#ifndef STRATEGIES_DEVICE_STRATEGY_HH_
+#define STRATEGIES_DEVICE_STRATEGY_HH_
+
+namespace low_latency {
+
+class DeviceContext;
+
+class DeviceStrategy {
+ DeviceContext& device;
+
+ public:
+ DeviceStrategy(DeviceContext& device);
+ virtual ~DeviceStrategy();
+};
+
+} // namespace low_latency
+
+#endif \ No newline at end of file
diff --git a/src/strategies/low_latency2/device_strategy.cc b/src/strategies/low_latency2/device_strategy.cc
new file mode 100644
index 0000000..7c10088
--- /dev/null
+++ b/src/strategies/low_latency2/device_strategy.cc
@@ -0,0 +1,10 @@
+#include "device_strategy.hh"
+
+namespace low_latency {
+
+LowLatency2DeviceStrategy::LowLatency2DeviceStrategy(DeviceContext& device)
+ : DeviceStrategy(device) {}
+
+LowLatency2DeviceStrategy::~LowLatency2DeviceStrategy() {}
+
+} // namespace low_latency
diff --git a/src/strategies/low_latency2/device_strategy.hh b/src/strategies/low_latency2/device_strategy.hh
new file mode 100644
index 0000000..18f8bd9
--- /dev/null
+++ b/src/strategies/low_latency2/device_strategy.hh
@@ -0,0 +1,18 @@
+#ifndef STRATEGIES_LOW_LATENCY2_DEVICE_STRATEGY_HH_
+#define STRATEGIES_LOW_LATENCY2_DEVICE_STRATEGY_HH_
+
+#include "strategies/device_strategy.hh"
+
+namespace low_latency {
+
+class DeviceContext;
+
+class LowLatency2DeviceStrategy final : public DeviceStrategy {
+ public:
+ LowLatency2DeviceStrategy(DeviceContext& device);
+ virtual ~LowLatency2DeviceStrategy();
+};
+
+} // namespace low_latency
+
+#endif
diff --git a/src/strategies/low_latency2/queue_strategy.cc b/src/strategies/low_latency2/queue_strategy.cc
new file mode 100644
index 0000000..85e1aae
--- /dev/null
+++ b/src/strategies/low_latency2/queue_strategy.cc
@@ -0,0 +1,10 @@
+#include "queue_strategy.hh"
+
+namespace low_latency {
+
+LowLatency2QueueStrategy::LowLatency2QueueStrategy(QueueContext& queue)
+ : QueueStrategy(queue) {}
+
+LowLatency2QueueStrategy::~LowLatency2QueueStrategy() {}
+
+} // namespace low_latency
diff --git a/src/strategies/low_latency2/queue_strategy.hh b/src/strategies/low_latency2/queue_strategy.hh
new file mode 100644
index 0000000..9688cf4
--- /dev/null
+++ b/src/strategies/low_latency2/queue_strategy.hh
@@ -0,0 +1,18 @@
+#ifndef STRATEGIES_LOW_LATENCY2_QUEUE_STRATEGY_HH_
+#define STRATEGIES_LOW_LATENCY2_QUEUE_STRATEGY_HH_
+
+#include "strategies/queue_strategy.hh"
+
+namespace low_latency {
+
+class QueueContext;
+
+class LowLatency2QueueStrategy final : public QueueStrategy {
+ public:
+ LowLatency2QueueStrategy(QueueContext& queue);
+ virtual ~LowLatency2QueueStrategy();
+};
+
+} // namespace low_latency
+
+#endif
diff --git a/src/strategies/queue_strategy.cc b/src/strategies/queue_strategy.cc
new file mode 100644
index 0000000..7b88e17
--- /dev/null
+++ b/src/strategies/queue_strategy.cc
@@ -0,0 +1,11 @@
+#include "queue_strategy.hh"
+
+#include "queue_context.hh"
+
+namespace low_latency {
+
+QueueStrategy::QueueStrategy(QueueContext& queue) : queue(queue) {}
+
+QueueStrategy::~QueueStrategy() {}
+
+} // namespace low_latency \ No newline at end of file
diff --git a/src/strategies/queue_strategy.hh b/src/strategies/queue_strategy.hh
new file mode 100644
index 0000000..0b9edc8
--- /dev/null
+++ b/src/strategies/queue_strategy.hh
@@ -0,0 +1,18 @@
+#ifndef STRATEGIES_QUEUE_STRATEGY_HH_
+#define STRATEGIES_QUEUE_STRATEGY_HH_
+
+namespace low_latency {
+
+class QueueContext;
+
+class QueueStrategy {
+ QueueContext& queue;
+
+ public:
+ QueueStrategy(QueueContext& queue);
+ virtual ~QueueStrategy();
+};
+
+} // namespace low_latency
+
+#endif \ No newline at end of file