equal
deleted
inserted
replaced
38 C |
38 C |
39 }; |
39 }; |
40 |
40 |
41 State state = State::A; |
41 State state = State::A; |
42 |
42 |
|
43 bool started = false; |
|
44 |
43 protected: |
45 protected: |
44 |
46 |
45 void update() override { |
47 void update() override { |
46 |
48 |
|
49 if (!started) { |
|
50 handlers.writeStreamStart(); |
|
51 started = true; |
|
52 } |
|
53 |
|
54 handlers.writeCollectionStart(ASN1ContentHandler::CollectionType::Sequence); |
47 handlers.writeNull(); |
55 handlers.writeNull(); |
|
56 handlers.writeBoolean(true); |
|
57 handlers.writeInteger(123); |
|
58 handlers.writeString(ASN1ContentHandler::StringType::UTF8String, "relational pipes"); |
|
59 handlers.writeCollectionEnd(); |
48 |
60 |
49 if (state == State::A) { |
61 if (state == State::A) { |
50 |
62 |
51 } else if (state == State::B) { |
63 } else if (state == State::B) { |
52 |
64 |
53 } else if (state == State::C) { |
65 } else if (state == State::C) { |
54 |
66 |
55 } |
67 } |
|
68 } |
56 |
69 |
|
70 public: |
57 |
71 |
58 |
72 void close() override { |
|
73 if (started) handlers.writeStreamEnd(); |
59 } |
74 } |
60 |
75 |
61 }; |
76 }; |
62 |
77 |
63 } |
78 } |