clean-up, comments v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Thu, 01 Apr 2021 21:19:50 +0200
branchv_0
changeset 8 6f5616572273
parent 7 93d9c4fce585
child 9 08c913c9662f
clean-up, comments
src/X11Handler.h
--- a/src/X11Handler.h	Thu Apr 01 21:09:58 2021 +0200
+++ b/src/X11Handler.h	Thu Apr 01 21:19:50 2021 +0200
@@ -22,7 +22,6 @@
 #include <iostream>
 #include <sstream>
 #include <locale>
-#include <codecvt>
 #include <stdexcept>
 
 #include <X11/extensions/XTest.h>
@@ -79,7 +78,6 @@
 
 	Display display;
 	Configuration& configuration;
-	std::wstring_convert<std::codecvt_utf8<wchar_t>> convertor; // TODO: probably not needed
 	std::vector<relpipe::reader::handlers::AttributeMetadata> attributes;
 	relpipe::common::type::Integer attributeIndex = 0;
 public:
@@ -89,6 +87,7 @@
 	}
 
 	void startRelation(relpipe::common::type::StringX name, std::vector<relpipe::reader::handlers::AttributeMetadata> attributes) override {
+		// TODO: check relation name, print waring if it does not match
 		if (display.display) {
 			if (this->attributes.empty()) {
 				this->attributes = attributes;
@@ -102,6 +101,8 @@
 	}
 
 	void attribute(const relpipe::common::type::StringX& value) override {
+		// TODO: strictly expect correct data types (integers)?
+		// TODO: shorter codes (k/b/m, p/r) instead of names or both?
 		if (attributes[attributeIndex].getAttributeName() == L"device") {
 			// TODO: maybe add some filtering based on device ID
 		} else if (attributes[attributeIndex].getAttributeName() == L"type") {
@@ -155,7 +156,6 @@
 	}
 
 	void endOfPipe() {
-		// XTestDiscard(display.display); // TODO: wait before discard?
 	}
 
 };