streamlet examples: QR: return also the symbol count v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sat, 24 Apr 2021 20:12:41 +0200
branchv_0
changeset 87 d846da24dd35
parent 86 3caa19520689
child 88 8eb799bf1d39
streamlet examples: QR: return also the symbol count
streamlet-examples/qr.cpp
--- a/streamlet-examples/qr.cpp	Sat Apr 24 20:03:39 2021 +0200
+++ b/streamlet-examples/qr.cpp	Sat Apr 24 20:12:41 2021 +0200
@@ -107,6 +107,7 @@
 		std::vector<AttributeMetadata> oam;
 		int i = 0;
 		oam.push_back({getAlias(i++, L"qr"), STRING});
+		oam.push_back({getAlias(i++, L"qr_count"), INTEGER});
 		oam.push_back({getAlias(i++, L"qr_xml"), STRING});
 		return oam;
 	}
@@ -159,6 +160,7 @@
 		std::vector<OutputAttribute> oa;
 		// TODO: report also validInput (distinguish it from hasSymbols)
 		oa.push_back({first, !hasSymbols});
+		oa.push_back({std::to_wstring(symbols.size()), false});
 		oa.push_back({fromBytes(xml.str()), false});
 		return oa;
 	}