RelpipeASN1ContentHandler: make attribute type mandatory (in the header) v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Tue, 27 Jul 2021 18:30:24 +0200
branchv_0
changeset 7 2e4ee5a25f76
parent 6 523c9c39c996
child 8 3192dc8772de
RelpipeASN1ContentHandler: make attribute type mandatory (in the header)
src/RelpipeASN1ContentHandler.h
--- a/src/RelpipeASN1ContentHandler.h	Mon Jul 26 23:41:18 2021 +0200
+++ b/src/RelpipeASN1ContentHandler.h	Tue Jul 27 18:30:24 2021 +0200
@@ -42,6 +42,7 @@
 		HeaderItem,
 		AttributeName,
 		AttributeType,
+		AttributeNext,
 		Records,
 		Record,
 		End,
@@ -72,7 +73,7 @@
 
 	State setAttributeType(relpipe::common::type::StringX value) {
 		currentAttributes.back().typeId = writer->toTypeId(value);
-		return State::AttributeType;
+		return State::AttributeNext;
 	}
 
 public:
@@ -101,7 +102,7 @@
 	}
 
 	void writeCollectionEnd() override {
-		if (state == State::AttributeType) state = State::HeaderItem;
+		if (state == State::AttributeNext) state = State::HeaderItem;
 		else if (state == State::HeaderItem) state = startRelation();
 		else if (state == State::Records) state = State::Relation;
 		else if (state == State::Record) state = State::Records;
@@ -160,4 +161,4 @@
 
 }
 }
-}
\ No newline at end of file
+}