src/RecfileHandler.h
branchv_0
changeset 3 b0fe316e1201
parent 2 db029ce62ec5
child 7 d59f31fa7009
--- a/src/RecfileHandler.h	Sat Mar 30 16:14:41 2019 +0100
+++ b/src/RecfileHandler.h	Sun Apr 07 12:49:38 2019 +0200
@@ -58,15 +58,15 @@
 		switch (type) {
 			case TypeId::BOOLEAN: return "bool";
 			case TypeId::INTEGER: return "int";
-			case TypeId::STRING: return ""; // TODO: string type?
+			case TypeId::STRING: return "";
 			default: throw RelpipeReaderException(L"Unsupported type – unable to convert to a Recfile type");
 		}
 	}
 
 	void writeAttributeMetadata(const handlers::AttributeMetadata& attribute) {
 		// FIXME: escaping/filtering
-		// FIXME: translate to recfile types
-		output << "%type: " << convertor.to_bytes(attribute.getAttributeName()) << " " << toRecfileType(attribute.getTypeId()) << std::endl;
+		std::string recfileType = toRecfileType(attribute.getTypeId());
+		if (recfileType.size()) output << "%type: " << convertor.to_bytes(attribute.getAttributeName()) << " " << recfileType << std::endl;
 	}
 
 	void writeSeparator() {