summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools/Idle/PlatformIdleQuerier.cpp')
-rw-r--r--SwifTools/Idle/PlatformIdleQuerier.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/SwifTools/Idle/PlatformIdleQuerier.cpp b/SwifTools/Idle/PlatformIdleQuerier.cpp
new file mode 100644
index 0000000..76a3f7d
--- /dev/null
+++ b/SwifTools/Idle/PlatformIdleQuerier.cpp
@@ -0,0 +1,26 @@
+#include "SwifTools/Idle/PlatformIdleQuerier.h"
+
+#if defined(HAVE_XSS)
+#include "SwifTools/Idle/XSSIdleQuerier.h"
+#else
+#include "SwifTools/Idle/DummyIdleQuerier.h"
+#endif
+
+#include <cassert>
+#include <iostream>
+
+namespace Swift {
+
+PlatformIdleQuerier::PlatformIdleQuerier() : querier(NULL) {
+#if defined(HAVE_XSS)
+ querier = new XSSIdleQuerier();
+#else
+ querier = new DummyIdleQuerier();
+#endif
+}
+
+PlatformIdleQuerier::~PlatformIdleQuerier() {
+ delete querier;
+}
+
+}